Opened 5 years ago

Closed 2 years ago

# Ticket page load 10x slower with plugin enabled

Reported by: Owned by: wrobel.przemyslaw@… Nathan Bird normal TicketMoverPlugin normal needinfo 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.

### comment:1 Changed 5 years ago by Ryan J Ollos

Are you running the latest, r12984? I don't have any good ideas as to what the cause could be.

### comment:2 follow-up:  3 Changed 5 years ago by Nathan Bird

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 in reply to:  2 Changed 5 years ago by Ryan J Ollos

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 5 years ago by szybalski@…

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 in reply to:  5 Changed 5 years ago by Ryan J Ollos

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).

Last edited 5 years ago by Ryan J Ollos (previous) (diff)

### comment:7 Changed 5 years ago by Nathan Bird

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 5 years ago by 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?

Thanks Lucas

### comment:9 in reply to:  8 Changed 5 years ago by Nathan Bird

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?

### comment:10 follow-up:  13 Changed 5 years ago by szybalski@…

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 5 years ago by 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.

Can you update the ticket to: 1: move to new trac and set to user "somebody"

1. Move to new ticket as set as new

Let me know if that can be done. Thanks Lucas

Version 0, edited 5 years ago by szybalski@… (next)

### comment:12 in reply to:  11 Changed 5 years ago by Nathan Bird

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:

This helps us keep track of what's done; what needs to be done.

Thanks

### comment:13 in reply to:  10 Changed 5 years ago by Ryan J Ollos

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 in reply to:  4 Changed 2 years ago by Ryan J Ollos

Resolution: → fixed new → closed

Should be fixed in [12863].

### Modify Ticket

Change Properties