-
-
Notifications
You must be signed in to change notification settings - Fork 63
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
Update Streamlit to 1.32.2 #783
Conversation
Compare these:
Conditions:
Result:
|
It might be fine to leave it in bootstrap if the |
c058063
to
3491e0e
Compare
3491e0e
to
3f6b1ba
Compare
Thanks, it makes sense.
I will measure the time of installing the packages soon anyway |
Removing the matplotlib patch resulted in reducing the booting up time from ~5.2s to ~4.9s. |
3f6b1ba introduced the lazy Overall, the init time became ~10s to ~4s. |
…and click package dependency
After e2f668e which removed the
(The usage data was provided by @lukasmasuch ) We should consider to remove them or not. Note:
|
Measure the performance improvements when removing these packages
--- a/packages/kernel/src/worker.ts
+++ b/packages/kernel/src/worker.ts
@@ -172,6 +172,7 @@ async function loadPyodideAndPackages() {
postProgressMessage("Installing packages.");
await pyodide.loadPackage("micropip");
const micropip = pyodide.pyimport("micropip");
+ performance.mark('start:install');
if (wheels) {
console.debug(
"Installing the wheels:",
@@ -194,6 +195,8 @@ async function loadPyodideAndPackages() {
await micropip.install.callKwargs(requirements, { keep_going: true });
console.debug("Installed the requirements");
}
+ performance.mark('end:install');
+ console.log("PERF:", performance.measure('install', 'start:install', 'end:install'));
// The following code is necessary to avoid errors like `NameError: name '_imp' is not defined`
// at importing installed packages.
Baseline (e2f668e)pyodide.asm.js:9 Loading typing-extensions, cachetools, protobuf, numpy, pillow, fastparquet, cramjam, pandas, python-dateutil, six, pytz, fsspec, pyodide-http, jinja2, markupsafe, toolz, jsonschema, attrs, pyrsistent
Remove all:86.5MB
Remove only
|
|
Awesome analysis :) Do you know where
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍 But 1.32.1 still has an issue causing significant CPU load. We will likely roll out the 1.32.2 patch fixing this in a couple of hours.
@lukasmasuch Thanks
Looks like it's a
Indeed!
Thanks! Will wait for and merge it. |
I came up with this idea of lazy-install -> whitphx/streamlit#9 |
TODO:
bootstrap.py
following Use env variable to configure matplotlib backend streamlit/streamlit#8113Remove the lazy-loaded packages such as-> Cancel, or at least suspend this plan as Update Streamlit to 1.32.2 #783 (comment)altair
fromstreamlit
's requirements so they are not installed automatically at init to reduce the init time, and measure its performance improvement.requirements
explicitly.