Opened 12 years ago
Closed 9 years ago
#11091 closed defect (fixed)
Ticket page load 10x slower with plugin enabled
Reported by: | Owned by: | Nathan Bird | |
---|---|---|---|
Priority: | normal | Component: | TicketMoverPlugin |
Severity: | normal | Keywords: | needinfo |
Cc: | Trac Release: | 1.0 |
Description
I have recently found the reason why my trac runs so slow - with ticket mover enabled my ticket page load about 10-15 seconds whilst normally without this plugin about 1-2 seconds.
Attachments (0)
Change History (14)
comment:1 Changed 12 years ago by
comment:2 follow-up: 3 Changed 12 years ago by
The version I'm running is available at https://github.com/UnwashedMeme/TicketMoverPlugin (0.2.2) which was a fork of the one here on trac-hacks a while back(it didn't work for me at the time). At this point I believe it has diverged significantly, I haven't looked at rjollos code to really compare though.
Both versions of the plugin build up a list of all the trac environments in sibling folders. I've tried to add a bit of caching to this, but that is still in process. If your webserver is creating a new python process for every request (i.e. cgi instead of fcgi) then it would need to redo that work which could cause a slowdown.
comment:3 Changed 12 years ago by
Keywords: | needinfo added |
---|
Replying to UnwashedMeme:
The version I'm running is available at https://github.com/UnwashedMeme/TicketMoverPlugin (0.2.2) which was a fork of the one here on trac-hacks a while back(it didn't work for me at the time). At this point I believe it has diverged significantly, I haven't looked at rjollos code to really compare though.
It looks like the major difference is that you've implemented an ITicketActionController
. I've just tried to kill a few defects with this plugin, and have left it unchanged otherwise. Your implementation looks interesting, and I've added a link to it on the project wiki page, see diff.
Both versions of the plugin build up a list of all the trac environments in sibling folders. I've tried to add a bit of caching to this, but that is still in process. If your webserver is creating a new python process for every request (i.e. cgi instead of fcgi) then it would need to redo that work which could cause a slowdown.
You might want to look at #11000 / [12863].
wrobel.przemyslaw@…: Could you try both versions and let us know if you experience the problem for just one or both?
comment:5 follow-up: 6 Changed 12 years ago by
We actually have the same problem. The issue is that every time you load the ticket the "session" information of where the other trac's are at is loaded.
So instead of loading it once (There are 3 other tracks you can move this ticket to)..you load it ever time which takes time.
A while I had a quick email with the developer and it was suggested to use some variable in a session to cache that information, but I did not find time to find out what needs to be changed.
Can you look how you load the other environments and add that to session?
comment:6 Changed 12 years ago by
Replying to szybalski@…:
We actually have the same problem.
Are you using the version hosted at t-h.o or on GitHub? We believe the issue is fixed in the version hosted on t-h.o (fix by jun66j5).
comment:7 Changed 12 years ago by
I believe this problem is also fixed on the GitHub version. I looked at it a bit more after this came up several weeks ago.
The way I solved it (which works for me, may not for others) is to just presume sibling folders that look like trac folders (have a conf/trac.ini
) are valid and don't try to open_environment
until someone actually does the move.
comment:8 follow-up: 9 Changed 12 years ago by
Does the one on Github also requires TracSqlHelperScript. I see the github says this adds "Move to and Delete Ticket". This is actually not what we want. We don't allow tickets to be Deleted (company wide policy" . For us we would prefer:
"Move to and close the ticket"
Does the version on github or the version in track-hacks allows us to move and close (not delete) ticket?
Thanks Lucas
comment:9 Changed 12 years ago by
Replying to szybalski@…:
Does the one on Github also requires TracSqlHelperScript. I see the github says this adds "Move to and Delete Ticket". This is actually not what we want. We don't allow tickets to be Deleted (company wide policy" . For us we would prefer:
"Move to and close the ticket"
Does the version on github or the version in track-hacks allows us to move and close (not delete) ticket?
Yes, I updated the README; Github had badly formatted it. See https://github.com/UnwashedMeme/TicketMoverPlugin#readme
comment:10 follow-up: 13 Changed 12 years ago by
In the original plugin I have commented out the words that allow you to delete. Which file is that in? I just want it to say "move ticket to...."
again. We don't want people to delete tickets. (Hiding work, or deleting tickets that are inconvenient)
Would it be possible to merge two plugins into one under trachacks?
Thanks Lucas
comment:11 follow-up: 12 Changed 11 years ago by
Hello, I'm having problem with the git version. Before ticket is moved it is closed as duplicate. Then its moved to a new trac. On the new trac it is also closed, the username was moved but the user doesn't exist in the new trac.
Can you update the ticket to:
- move to new trac and set to user "somebody"
- Move to new ticket as set as new
Let me know if that can be done. Thanks Lucas
comment:12 Changed 11 years ago by
Replying to szybalski@…:
Hello, I'm having problem with the git version. Before ticket is moved it is closed as duplicate. Then its moved to a new trac. On the new trac it is also closed, the username was moved but the user doesn't exist in the new trac.
This is a different issue; please file as a new ticket:
- If you fetched plugin from trac hacks file ticket here: http://trac-hacks.org/newticket?component=TicketMoverPlugin&owner=k0s
- If you fetched plugin from github then please file an issue there: https://github.com/UnwashedMeme/TicketMoverPlugin/issues
This helps us keep track of what's done; what needs to be done.
Thanks
comment:13 Changed 11 years ago by
Replying to szybalski@…:
Would it be possible to merge two plugins into one under trachacks?
I can see the value in that, but I don't have much time to commit to maintaining this plugin. I was just fixing up a few things since some users were running the trac-hacks version; in fact I didn't even know of the GitHub version for quite a while.
comment:14 Changed 9 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Are you running the latest, r12984? I don't have any good ideas as to what the cause could be.