Skip to content

perf: store decoded rids#315

Merged
dkharms merged 5 commits intomainfrom
0-decoded-rids
Jan 26, 2026
Merged

perf: store decoded rids#315
dkharms merged 5 commits intomainfrom
0-decoded-rids

Conversation

@dkharms
Copy link
Member

@dkharms dkharms commented Jan 18, 2026

Description

We store in the cache decompressed (but not decoded) RIDs as []byte and on each access to RID block we decode it using binary.LittleEndian.Uint64 function. This PR changes behaviour to store already decoded RIDs in the cache.

There is no memory usage penalty since we just move integers from one representation ([]byte) to another ([]uint64) without introducing new structures etc.


  • I have read and followed all requirements in CONTRIBUTING.md;
  • I used LLM/AI assistance to make this pull request;

If you have used LLM/AI assistance please provide model name and full prompt:

Model: {{model-name}}
Prompt: {{prompt}}

@dkharms
Copy link
Member Author

dkharms commented Jan 18, 2026

@seqbenchbot up 0-seqbench search-keyword-exact-match

@seqbenchbot
Copy link

seqbenchbot commented Jan 18, 2026

Nice, @dkharms <(-^,^-)=b!

Your request was successfully served.
Identificator for your ongoing benchmark - 0ac06048.

Here is a list of helpful links:

  • Take a look at Grafana dashboard;
  • Live-tailing logs are also available;

Have a great time!

@dkharms
Copy link
Member Author

dkharms commented Jan 18, 2026

Here are some results. Seems like a very good return for a such simple change :)

image image

@dkharms
Copy link
Member Author

dkharms commented Jan 18, 2026

@seqbenchbot down 0ac06048

@seqbenchbot
Copy link

seqbenchbot commented Jan 18, 2026

Nice, @dkharms <(-^,^-)=b!

Your request was successfully served.
The benchmark with identificator 0ac06048 was stopped.

Have a great time!

@ozontech ozontech deleted a comment from seqbenchbot Jan 18, 2026
@ozontech ozontech deleted a comment from seqbenchbot Jan 18, 2026
Base automatically changed from 0-seqbench to main January 19, 2026 13:33
@dkharms dkharms marked this pull request as ready for review January 19, 2026 13:45
@dkharms dkharms added the performance Features or improvements that positively affect seq-db performance label Jan 19, 2026
@dkharms
Copy link
Member Author

dkharms commented Jan 19, 2026

@seqbenchbot up main search-keyword-exact-match

@seqbenchbot
Copy link

seqbenchbot commented Jan 19, 2026

Nice, @dkharms <(-^,^-)=b!

Your request was successfully served.
Identificator for your ongoing benchmark - 6923290d.

Here is a list of helpful links:

  • Take a look at Grafana dashboard;
  • Live-tailing logs are also available;

Have a great time!

@codecov-commenter
Copy link

codecov-commenter commented Jan 19, 2026

Codecov Report

❌ Patch coverage is 70.00000% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.62%. Comparing base (e2e0db7) to head (ad5f0a3).

Files with missing lines Patch % Lines
frac/sealed/seqids/loader.go 64.70% 3 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #315      +/-   ##
==========================================
+ Coverage   71.59%   71.62%   +0.03%     
==========================================
  Files         204      204              
  Lines       14769    14767       -2     
==========================================
+ Hits        10574    10577       +3     
+ Misses       3441     3438       -3     
+ Partials      754      752       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dkharms
Copy link
Member Author

dkharms commented Jan 19, 2026

@seqbenchbot down 6923290d

@github-actions
Copy link
Contributor

🔴 Performance Degradation

Some benchmarks have degraded compared to the previous run.
Click on Show table button to see full list of degraded benchmarks.

Show table
Name Previous Current Ratio Verdict
FindSequence_Random/tiny-4 fd2ede 6fb57b
2624.58 MB/s 2262.34 MB/s 0.86 🔴
24.38 ns/op 28.29 ns/op 1.16 🔴

@ozontech ozontech deleted a comment from seqbenchbot Jan 20, 2026
@ozontech ozontech deleted a comment from seqbenchbot Jan 20, 2026
@ozontech ozontech deleted a comment from seqbenchbot Jan 20, 2026
@github-actions
Copy link
Contributor

🔴 Performance Degradation

Some benchmarks have degraded compared to the previous run.
Click on Show table button to see full list of degraded benchmarks.

Show table
Name Previous Current Ratio Verdict
FindSequence_Random/small-4 467eb3 686bc8
5128.78 MB/s 4661.27 MB/s 0.91 🔴
Indexer-4 467eb3 686bc8
550078220.00 B/op 657272200.00 B/op 1.19 🔴

@github-actions
Copy link
Contributor

🔴 Performance Degradation

Some benchmarks have degraded compared to the previous run.
Click on Show table button to see full list of degraded benchmarks.

Show table
Name Previous Current Ratio Verdict
FindSequence_Random/small-4 467eb3 4fe863
5128.78 MB/s 4575.85 MB/s 0.89 🔴
49.91 ns/op 55.95 ns/op 1.12 🔴

@github-actions
Copy link
Contributor

🔴 Performance Degradation

Some benchmarks have degraded compared to the previous run.
Click on Show table button to see full list of degraded benchmarks.

Show table
Name Previous Current Ratio Verdict
FindSequence_Random/small-4 a81b35 6bda4d
5186.82 MB/s 4432.11 MB/s 0.85 🔴
49.36 ns/op 57.76 ns/op 1.17 🔴
GenerateDocs-4 a81b35 6bda4d
910.40 ns/op 1015.00 ns/op 1.11 🔴
ProcessDocuments-4 a81b35 6bda4d
4.00 allocs/op 5.00 allocs/op 1.25 🔴

@dkharms
Copy link
Member Author

dkharms commented Jan 22, 2026

@seqbenchbot up main search-keyword-exact-match-cold

@seqbenchbot
Copy link

seqbenchbot commented Jan 22, 2026

Nice, @dkharms <(-^,^-)=b!

Your request was successfully served.
Identificator for your ongoing benchmark - b94f8f4a.

Here is a list of helpful links:

  • Take a look at Grafana dashboard;
  • Live-tailing logs are also available;

Have a great time!

@dkharms
Copy link
Member Author

dkharms commented Jan 22, 2026

@seqbenchbot up 0-decoded-rids search-keyword-exact-match-cold

@seqbenchbot
Copy link

seqbenchbot commented Jan 22, 2026

Nice, @dkharms <(-^,^-)=b!

Your request was successfully served.
Identificator for your ongoing benchmark - f0cc0fb8.

Here is a list of helpful links:

  • Take a look at Grafana dashboard;
  • Live-tailing logs are also available;

Have a great time!

@dkharms
Copy link
Member Author

dkharms commented Jan 22, 2026

@seqbenchbot down f0cc0fb8

@seqbenchbot
Copy link

seqbenchbot commented Jan 22, 2026

Nice, @dkharms <(-^,^-)=b!

Your request was successfully served.
The benchmark with identificator f0cc0fb8 was stopped.

Have a great time!

@dkharms
Copy link
Member Author

dkharms commented Jan 22, 2026

@seqbenchbot up 0-decoded-rids search-keyword-exact-match-cold

@seqbenchbot
Copy link

seqbenchbot commented Jan 22, 2026

Nice, @dkharms <(-^,^-)=b!

Your request was successfully served.
Identificator for your ongoing benchmark - 756615b7.

Here is a list of helpful links:

  • Take a look at Grafana dashboard;
  • Live-tailing logs are also available;

Have a great time!

@dkharms
Copy link
Member Author

dkharms commented Jan 22, 2026

@seqbenchbot down 756615b7

@seqbenchbot
Copy link

seqbenchbot commented Jan 22, 2026

Nice, @dkharms <(-^,^-)=b!

Your request was successfully served.
The benchmark with identificator 756615b7 was stopped.

Have a great time!

@dkharms
Copy link
Member Author

dkharms commented Jan 22, 2026

@seqbenchbot up 0-decoded-rids search-keyword-exact-match

@seqbenchbot
Copy link

seqbenchbot commented Jan 22, 2026

Nice, @dkharms <(-^,^-)=b!

Your request was successfully served.
Identificator for your ongoing benchmark - 3f3f05e0.

Here is a list of helpful links:

  • Take a look at Grafana dashboard;
  • Live-tailing logs are also available;

Have a great time!

@dkharms
Copy link
Member Author

dkharms commented Jan 22, 2026

@seqbenchbot down 3f3f05e0

@seqbenchbot
Copy link

seqbenchbot commented Jan 22, 2026

Nice, @dkharms <(-^,^-)=b!

Your request was successfully served.
The benchmark with identificator 3f3f05e0 was stopped.

Have a great time!

@ozontech ozontech deleted a comment from seqbenchbot Jan 22, 2026
@ozontech ozontech deleted a comment from seqbenchbot Jan 22, 2026
@dkharms
Copy link
Member Author

dkharms commented Jan 22, 2026

@seqbenchbot up main search-keyword-exact-match

@seqbenchbot
Copy link

seqbenchbot commented Jan 22, 2026

Nice, @dkharms <(-^,^-)=b!

Your request was successfully served.
Identificator for your ongoing benchmark - 684bf7c4.

Here is a list of helpful links:

  • Take a look at Grafana dashboard;
  • Live-tailing logs are also available;

Have a great time!

@dkharms
Copy link
Member Author

dkharms commented Jan 22, 2026

@seqbenchbot down 684bf7c4

@seqbenchbot
Copy link

seqbenchbot commented Jan 22, 2026

Nice, @dkharms <(-^,^-)=b!

Your request was successfully served.
The benchmark with identificator 684bf7c4 was stopped.

Have a great time!

@dkharms dkharms self-assigned this Jan 23, 2026
@eguguchkin eguguchkin added this to the v0.66.0 milestone Jan 23, 2026
@github-actions
Copy link
Contributor

🔴 Performance Degradation

Some benchmarks have degraded compared to the previous run.
Click on Show table button to see full list of degraded benchmarks.

Show table
Name Previous Current Ratio Verdict
Bitmask-4 e2e0db 6efa1a
0.00 B/op 3.00 B/op NaN 🔴
GenerateDocs-4 e2e0db 6efa1a
950.70 ns/op 1165.00 ns/op 1.23 🔴
ProcessDocuments-4 e2e0db 6efa1a
381.00 B/op 33575.00 B/op 88.12 🔴
4.00 allocs/op 5.00 allocs/op 1.25 🔴

@dkharms dkharms merged commit 5b4cce1 into main Jan 26, 2026
8 checks passed
@dkharms dkharms deleted the 0-decoded-rids branch January 26, 2026 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

performance Features or improvements that positively affect seq-db performance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants