Skip to content

Performance: Sequential Network Round-Trips in Redis Key Scanner #187

Description

@ZhuchkaTriplesix

In redis_keys_view.dart, scanning Redis keys (which works in batches of 100) fetches the type and TTL for each key sequentially:

for (final name in keyNames) {
  final type = await widget.connection.keyType(name);
  final ttl = await widget.connection.ttl(name);
  ...
}

This incurs up to 200 sequential network round-trips per batch, creating a severe rendering/loading latency if the connection has even minor network latency.

Steps to fix:
Execute the type and TTL lookups concurrently for the scanned keys using Future.wait or pipeline them.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions