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

Load Times and TTFX #5

Open
tknopp opened this issue Jun 20, 2022 · 2 comments
Open

Load Times and TTFX #5

tknopp opened this issue Jun 20, 2022 · 2 comments

Comments

@tknopp
Copy link
Member

tknopp commented Jun 20, 2022

This issue is meant to track load times and TTFX (time to first X). On my Mac (M1 Max, Intel binaries) I get:

julia> @time using Gtk
  0.924702 seconds (2.26 M allocations: 126.467 MiB, 2.75% gc time, 33.69% compilation time)
julia> @time using Gtk4
  1.404390 seconds (3.29 M allocations: 180.272 MiB, 3.13% gc time, 47.39% compilation time)

which is already pretty close. TTFX is also slower but I have not properly timed it yet. This issue is certainly not urgent but we should contact people with experience of optimizing load times (-> @timholy :-) ) before doing the switch.

@jwahlstrand
Copy link
Member

The time for using (which on my Linux laptop is 0.5 s for Gtk4 vs. 0.46 s for Gtk) might be affected by the large number of autogenerated methods in src/gen. I noticed that as I added methods, that load time got slower. We could consider splitting off some of the less-used functionality into optional modules. This could include 90% of the gio_methods (many of which overlap functionality built into Julia), graphene methods and gsk4 methods (which will only be useful for fancy custom widgets).

For TTFX, note that there are currently no precompile statements. We could copy what's in Gtk and see how things change.

@tknopp
Copy link
Member Author

tknopp commented Jun 20, 2022

If Gtk4 has larger coverage, longer load times are actually justified. The numbers are quite good IMHO and we should first focus on stability.

Good to know about TTFX!

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

No branches or pull requests

2 participants