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.
This PR supersedes #112 due to CI permissions issues.
Overview
Added a
--graph-only
boolean command line option to theorca serve
entry point. When this option is present, only theplotly-graph
component is run (not thumbnail, dash, etc.).When graph conversion is the only service needed, this option reduces the number of electron processes, the memory usage, and startup time.
Past Discussion
See #110
Resource usage comparison
Here's a comparison of the baseline resource usage on OSX
Without
--graph-only
(legacy behavior)There are 8 processes running, consuming ~390MB of memory.
Based on my testing from Python, from launching the server to receiving the first image conversion takes about 2.2 seconds.
With `--graph-only
There are 3 processes running, consuming ~120MB of memory.
Based on my testing from Python, from launching the server to receiving the first image conversion takes about 1.7 seconds.
Resource Summary
If all you need is graph conversion, this flag saves 5 processes, 270MB of memory, and a half second of startup time.
Testing
I added a new integration testing file at
test/integration/orca_serve_graph-only_test.js
. This file is based on a subset of the testing intest/integration/orca_serve_test.js
. But it checks to make sure there is only 1 window running, that the graph-component is running, and that the thumbnail component is not running.