Skip to content

ui: Move sqlmodules load out of the traceload hotpath#2109

Merged
stevegolton merged 1 commit intomainfrom
dev/sg/sqlmodules-loading
Jul 10, 2025
Merged

ui: Move sqlmodules load out of the traceload hotpath#2109
stevegolton merged 1 commit intomainfrom
dev/sg/sqlmodules-loading

Conversation

@stevegolton
Copy link
Member

@stevegolton stevegolton commented Jul 10, 2025

This fix should speed up trace load times significantly.

This patch moves the SQL modules definition loading to onActivate, so that it's done once on app load rather than having to do it on every trace load. This means we only load the definitions once, and also we also get a head start loading the modules, as we can load in parallel with the rest of the app starting up / trace loading.

This does mean that the definitions are possibly undefined, but everywhere that uses the definitions has now been modified to handle this maybe undefined case.

This patch moves the SQL modules definition loading to onActivate, so that it's done once on app load rather than having to do it on every trace load. This means we only load the definitions once, and also we also get a head start loading the modules, as we can load in parallel with the rest of the app starting up / trace loading.

This does mean that the definitions are possibly undefined, but everywhere that uses the definitions has now been modified to handle this maybe undefined case.

Change-Id: I3210c37280fcbf1ad4d1dd2149bc583cd19a264c
@LalitMaganti
Copy link
Member

Steve: can we land this?

@stevegolton stevegolton merged commit 49ecba0 into main Jul 10, 2025
17 checks passed
@stevegolton stevegolton deleted the dev/sg/sqlmodules-loading branch July 10, 2025 18:40
olehkuznetsov pushed a commit to olehkuznetsov/perfetto that referenced this pull request Mar 12, 2026
This fix should speed up trace load times significantly.

This patch moves the SQL modules definition loading to onActivate, so
that it's done once on app load rather than having to do it on every
trace load. This means we only load the definitions once, and also we
also get a head start loading the modules, as we can load in parallel
with the rest of the app starting up / trace loading.

This does mean that the definitions are possibly undefined, but
everywhere that uses the definitions has now been modified to handle
this maybe undefined case.
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.

3 participants