Skip to content

perf(redis): pipeline TYPE/TTL for SCAN batches (#426) - #440

Merged
ZhuchkaTriplesix merged 1 commit into
devfrom
issue/426-redis-pipeline-type-ttl
Jul 27, 2026
Merged

perf(redis): pipeline TYPE/TTL for SCAN batches (#426)#440
ZhuchkaTriplesix merged 1 commit into
devfrom
issue/426-redis-pipeline-type-ttl

Conversation

@ZhuchkaTriplesix

Copy link
Copy Markdown
Member

Summary

  • Adds RedisConnection.typesAndTtls — pipelined TYPE then TTL with pipe_start/pipe_end (Nagle batching) and fire-all-then-await.
  • RedisKeysView SCAN batches use it instead of per-key Future.wait of sequential TYPE→TTL.
  • RTT: before ≈ 2N (or 2 waves of N with concurrent awaits); after ≈ 1 burst of 2N commands / ~1 RTT.

Closes #426

Test plan

  • flutter test test/core/database/redis_types_and_ttls_test.dart test/features/redis/redis_keys_view_test.dart
  • Open Redis keys view; types/TTLs still populate; Load more works

Enqueue all TYPE then all TTL before awaiting replies (pipe_start/end),
so a 100-key batch is one RTT burst instead of ~200 round-trips.

Closes #426
@github-actions github-actions Bot added performance Theme parser epic label: performance core Core library logic and services connections Database connections, URI parsing, pools labels Jul 27, 2026
@ZhuchkaTriplesix
ZhuchkaTriplesix merged commit 51558dd into dev Jul 27, 2026
4 checks passed
@ZhuchkaTriplesix
ZhuchkaTriplesix deleted the issue/426-redis-pipeline-type-ttl branch July 27, 2026 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

connections Database connections, URI parsing, pools core Core library logic and services performance Theme parser epic label: performance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant