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

Slow (14s) loading time #66

Open
dennisnez opened this issue Jul 22, 2020 · 1 comment
Open

Slow (14s) loading time #66

dennisnez opened this issue Jul 22, 2020 · 1 comment

Comments

@dennisnez
Copy link

dennisnez commented Jul 22, 2020

After upgrading from glabels-2 to glabels-3(.4.1) I immediately painfully noticed a muuch longer time to start the app - 14 seconds! 14 seconds of nothing appearing on screen, cpu at 100%, on my 1.6ghz machine.

Getting rid of the main culprits, lgl_db_init() and gl_mini_preview_pixbuf_cache_init() cut that down to 7 seconds and didn't seem to cause any obvious issues (yet). Are these functions needed? And can the loadtime be made faster than 7 seconds here? :p

--- glabels-3.4.1/src/glabels.c	2016-01-23 21:06:18.000000000 -0500
+++ ./glabels.c	2020-07-22 09:16:13.000000000 -0400
@@ -104,9 +104,7 @@
 	
 	/* Initialize subsystems */
 	gl_debug_init ();
-	lgl_db_init ();
 	gl_prefs_init ();
-	gl_mini_preview_pixbuf_cache_init ();
 	gl_merge_init ();
 	gl_recent_init ();
         gl_template_history_init ();
@sur5r
Copy link

sur5r commented Jul 22, 2020

The main issue is parsing of the template files which most probably happens somewhere in lgl_db_init(). For testing purposes, I once combined all template XMLs into a single file which reduced startup time a lot. I never got around to dig deeper, though.

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