Skip to content
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

Server graph only #114

Merged
merged 2 commits into from
Aug 9, 2018
Merged

Server graph only #114

merged 2 commits into from
Aug 9, 2018

Conversation

jonmmease
Copy link
Contributor

This PR supersedes #112 due to CI permissions issues.

Overview

Added a --graph-only boolean command line option to the orca serve entry point. When this option is present, only the plotly-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)

screen shot 2018-08-09 at 8 15 23 am

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

screen shot 2018-08-09 at 8 15 59 am

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 in test/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.

When this option is present, only the plotly-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.
@etpinard
Copy link
Contributor

etpinard commented Aug 9, 2018

Beautiful, merge away 💃

@jonmmease jonmmease merged commit 066a4e1 into master Aug 9, 2018
@etpinard etpinard deleted the server_graph_only branch December 5, 2018 23:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants