After my post on profiling Specto’s startup, Wout Clymans put on his Hero Hacker Hat and fixed the major problem that was causing Specto to do too much work for nothing. Now, Specto starts in 2 seconds instead of 10 seconds.
What happened there? Well, for making sure that we are using the same “internal” watch list as the actual watches in ~/.config/specto/watches.list (if I’m not mistaken), Specto loaded the file each time and parsed it. The problem is that this is useful (not even 100% sure about it) only when you manually ask Specto to refresh, not during startup, where the watch list is obviously up to date. What Wout did to fix the problem is create a special parameter that makes those method avoid opening and parsing the watch list all the time on startup.
The question remains, however, if the startup time can be further optimized (with the profiling technique in my previous post), or if 2 seconds really is the bottomline; my understanding of profiling outputs is not deep enough to answer that, so any input would be welcome.
Being able to figure out why Specto takes 21 Mib of RAM would also be a nice thing. If it’s Python + GTK’s fault, well, “sho ga nai, desu yo~”. If we can optimize something in our existing code, however, that would be a problem that we should try to address.
Latest posts by Jeff (see all)
- Painting two old friends—Tintin vs Sephiroth - June 11, 2017
- Defence against the Dark Arts involves controlling your hardware - March 18, 2017
- Reviewing the Librem 15 - January 10, 2017