Repository navigation
Faster comparison view online: read each stored table once per click - #307
Merged
Merged
Conversation
The comparison view makes one QuantSession per rerun, and every component asks it for the design, settings, stamps and analysed tables again. Each ask went to the workspace cache (sqlite index plus a file), about 140 reads per click. On the online deployment, where the workspace sits on network storage, those serial round trips made a click take about 11 s. The session now keeps what it read for the rest of the rerun and forgets it whenever it writes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FkEGeoUM7eM3f7WXck24oU
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FkEGeoUM7eM3f7WXck24oU
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FkEGeoUM7eM3f7WXck24oU
Contributor
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
Merged
t0mdavid-m
added a commit
that referenced
this pull request
Nov 20, 2026
* Release 2.0.0-alpha.13 Bump the version and installer name and list the faster comparison view (#307) on the Quickstart page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FkEGeoUM7eM3f7WXck24oU * PR media: What's new panel Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FkEGeoUM7eM3f7WXck24oU * Remove PR media Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FkEGeoUM7eM3f7WXck24oU --------- Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What it does
In the online FLASHApp, comparing runs is slow. Each click (selecting a proteoform, sorting a table, switching the view) takes about 11 s, and opening the page takes about 16 s. On a local disk, the same release handles a click in 0.5 s.
The visualizations account for almost none of that time. A click sends about 90 KB, and the server spends about 0.3 s of CPU on the rerun. The rest is spent waiting on storage. The comparison view creates one
QuantSessionper rerun, and every component on the page asks it again for the design, the settings, the stamps and the analysed tables. Each request reads the workspace cache (an sqlite query plus a file), which comes to about 140 result reads, 150 existence checks and 490 index queries per click. The online deployment keeps workspaces on network storage, so each read is a round trip of a few milliseconds, and the reads run one after another.With this change, the session keeps what it has read until the rerun ends, and forgets it whenever it writes. It hands out copies, so a caller that changes a dict cannot change what the next component gets. Every Streamlit rerun creates a new session, so nothing is kept from one click to the next.
Measured
These numbers are from the example label-free comparison run locally, with every workspace read delayed by 25 ms to imitate network storage. The browser script is the same one the daily latency check uses (median of 2 runs):
Most of the remaining index queries come from
FileManager, which asks sqlite for its column list on every read. Caching that list would be the next step.Screenshots and video
These were recorded with 10 ms per read. Each video loads Explore results and then selects a proteoform.
Before: https://github.com/OpenMS/FLASHApp/raw/3b984fd972d594a22c45cc4099a2790818f506ae/pr-media/select-before.mp4
After: https://github.com/OpenMS/FLASHApp/raw/3b984fd972d594a22c45cc4099a2790818f506ae/pr-media/select-after.mp4
The views look the same before and after the change.
After, in the dark theme:

The media were committed and then removed in the next commit, so the diff contains only
src/quant/session.pyand its test.Checked
test_session_reads_each_stored_table_oncefails without the change and passes with it. It also checks that a returned value cannot be changed from outside and thatset_hiddenstill takes effect.pytest tests/: 1518 passed, 5 skipped. pylint--errors-onlyreports nothing on the changed files.🤖 Generated with Claude Code
https://claude.ai/code/session_01FkEGeoUM7eM3f7WXck24oU