#9032 closed enhancement (fixed)
[PATCH] Permission system slow with multiple calls
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | normal | Milestone: | 0.11.7 |
Component: | general | Version: | 0.11.1 |
Severity: | normal | Keywords: | permission performance consider |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
Trac slows down by time when used together with the privatetickets plugin. Not sure if this has any performance improvements on normal systems but hopefully it has.
For one report the rendering time went down from 43s to 5s. But the improvement is not limited to reports. This should affect all 0.11.x releases.
Attachments (1)
Change History (6)
by , 15 years ago
Attachment: | perm.py-caching.diff added |
---|
comment:1 by , 15 years ago
Keywords: | permission performance consider added |
---|---|
Milestone: | → 0.11.7 |
How costly in memory is this?
comment:2 by , 15 years ago
That depends on the number of users. It's ACTION → (timestamp, [users]). But in my test I only managed to trigger this call for TICKET_MODIFY. In that case it's ustring * users. I have a hard time seeing that it would be a problem since the data still need to be fetched from time to time.
If memory is an issue I suggest to try to re-use the same ustring object for all usernames, quick way would be to use intern() on them.
comment:4 by , 15 years ago
Owner: | set to |
---|
comment:5 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
PermissionSystem.get_users_with_permission caching