Noah Kantrowitz wrote: > On Apr 24, 2008, at 2:37 PM, Christian Boos wrote: > >> Hi, >> >> Forgot to ask around: does anyone foresee possible problems with this? >> >> http://trac.edgewall.org/attachment/ticket/6436/cache-get_ticket_fields-r6843.diff >> >> Summary: fixes the [query:...] slowdown by caching the result of >> Ticket.get_ticket_fields. There might well be lots of other situations >> where this speed things up, as the above operation was quite costly >> (e.g. 0.1 - 0.5 seconds) and is done at each creation of a Ticket or >> Query object. >> >> Eventual issue would be a situation where the cache would be invalid - >> ideally the cached result should be read-only. I think this is the >> case >> in Trac 0.11, but in case that assumption is wrong (it is wrong for >> 0.10), I return a copy of the list and a copy of each of its >> elements. A >> modification to a "deeper" structure (e.g. a list value) would however >> reach the cached stuff, so that would be a problem - but it should be >> considered a bug in the code which does such modifications. >> > > I would rather see what happens when we make the restrict_owner- > governed fields load lazily. That seems like a bigger problem to me. >
restrict_owner = true may indeed incur an additional penalty, but on my test environment I don't have lots of users, so restrict_owner can't be blamed for the slowness (which is quite noticeable, with or without restrict_owner set). But OTOH you're right about restrict_owner being problematic, as a change in the permissions could be another reason for invalidating the cache. Note that once this gets fixed, the problem with restrict_owner (#4245) will become less critical. -- Christian --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Trac Development" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/trac-dev?hl=en -~----------~----~----~----~------~----~------~--~---
