-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 17.12.2013 15:09, Brettschneider Falk wrote: > Hi, > > I have a suspicion about the performance of my plugin when I look at the > frequent use of all those SQL queries collected in > http://trac-hacks.org/browser/simplemultiprojectplugin/trunk/simplemultiproject/model.py. > > > Now I came across this trac.cache API > http://www.edgewall.org/docs/trac-trunk/html/api/trac_cache.html and my > question is: What is a good Trac plugin where I can have a look at it as > an example for how that cache must be programmed by using the trac.cache > API?
I knew of an example in TagsPlugin [1], but there are some more, as a quick search over t-h.o reveals [2]. > Or does it not matter and such cache is useless because SQLite is > already cached enough, internally? With a new Trac environment you'll never notice, but when it comes to age under use, issues very likely will become evident, if you did not think about performance before. Regardless of the db back-end you may want to cache complex or very often used queries. But don't do preemptive optimization, get facts by profiling first [3] (last link down on the page). Steffen Hoffmann [1] http://trac-hacks.org/browser/tagsplugin/trunk/tractags/ticket.py?rev=13461#L252 [2] http://pastebin.com/7ujDQAdC [3] http://trac.edgewall.org/wiki/TracPerformance -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAlKwtpYACgkQ31DJeiZFuHcVywCgmWaBMVbrVN4Uq+OYVkwSGT8k ij0An0zVPIfjHGgfSZWx6atKWjacHDGQ =t1qC -----END PGP SIGNATURE----- -- You received this message because you are subscribed to the Google Groups "Trac Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/trac-dev. For more options, visit https://groups.google.com/groups/opt_out.
