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

Move the style overrides to a separate HTML widget #79

Merged
merged 1 commit into from
May 14, 2021

Conversation

jpc
Copy link
Contributor

@jpc jpc commented Apr 7, 2021

Updating the styles every time we update the widget causes Safari to recalculate the styles and the layout for the whole notebook which completely ruins performance (100ms layouts on each update on an Apple M1). If we output the styles as a separate widget the browser only interprets them once and layout times on updates stay < 10ms.

Updating the styles every time we update the widget causes Safari
to recalculate the styles and the layout for the whole notebook which
completely ruins performance (100ms layouts on each update on an Apple
M1). If we output the styles as a separate widget the browser only
inteprets them once and layout times on updates stay < 10ms.
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@jpc jpc mentioned this pull request Apr 7, 2021
@gkossakowski
Copy link

I just verified that this patch indeed fixes perf issues with progress bar in Safari. Specifically, I manually patched my local fastprogress package install and see CPU usage dropping from 100% to <2% while progress bar is updating in Safari.

@sgugger it would be great to get this patch in!

@sgugger
Copy link
Contributor

sgugger commented May 14, 2021

Looks good to me! Thanks for fixing!

@sgugger sgugger merged commit 67d4072 into AnswerDotAI:master May 14, 2021
@jpc
Copy link
Contributor Author

jpc commented Oct 23, 2021

Hi, thanks for merging my change. Could we release a new minor version of the package? Installing from the repo is currently the only way to make fastai usable in Safari.

@jph00 jph00 added the bug Something isn't working label Feb 15, 2022
@jph00
Copy link
Contributor

jph00 commented Feb 15, 2022

Many apologies for the extremely slow release of this @jpc -- done now. (And thanks for the reminder)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants