-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Store messagepack values in database instead of JSON #288
Conversation
Performance SummaryComparing base 46d016b with head 024a5e9 on microsoft/TypeScript@v4.9.5. For details see workflow artifacts. Note that performance is tested on the last commits with changes in Before
After
|
Performance SummaryComparing base 46d016b with head 458db76 on microsoft/TypeScript@v4.9.5. For details see workflow artifacts. Note that performance is tested on the last commits with changes in Before
After
|
458db76
to
acb0fab
Compare
Performance SummaryComparing base e11f004 with head acb0fab on microsoft/TypeScript@v4.9.5. For details see workflow artifacts. Note that performance is tested on the last commits with changes in Before
After
|
Database access (particularly writing, it seems) is fairly slow. Currently the database is populated with JSON objects, which are pretty verbose. This PR changes that to use messagepack values, which are binary and optimized for small size, if I understand things correctly.
A rough comparison of index times shows a speedup of almost 2x for some files and a database size reduction of almost 3x. The time reduction is more pronounced for smaller files, probably because more of the index work is writing the data, compared to computing it.