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

Performance of state diffing: improve runtime type checks #2072

Merged
merged 1 commit into from
Apr 29, 2022

Conversation

fonsp
Copy link
Owner

@fonsp fonsp commented Apr 29, 2022

The functions notebook_to_js and Firebasey.diff are performance bottlenecks right now, and their runtime scales linearly with notebook size. They are called after every notebook state change.

For the PlutoUI sample notebook, which is quite large, these functions take about 5ms (on a fast CPU), adding a 5ms overhead to any state change.

Before

Schermafbeelding 2022-04-29 om 12 31 18

After

Schermafbeelding 2022-04-29 om 12 30 33

@github-actions
Copy link
Contributor

Try this Pull Request!

Open Julia and type:

julia> import Pkg
julia> Pkg.activate(temp=true)
julia> Pkg.add(url="https://github.com/fonsp/Pluto.jl", rev="optimise-notebook_to_js-1")
julia> using Pluto

@fonsp fonsp merged commit caf7326 into main Apr 29, 2022
@fonsp fonsp deleted the optimise-notebook_to_js-1 branch April 29, 2022 10:39
@fonsp fonsp added performance backend Concerning the julia server and runtime labels Apr 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Concerning the julia server and runtime performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant