Modify

Opened 12 years ago

Closed 9 years ago

#11091 closed defect (fixed)

Ticket page load 10x slower with plugin enabled

Reported by: wrobel.przemyslaw@… 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 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 Changed 12 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 12 years ago by Ryan J Ollos

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:4 Changed 12 years ago by Ryan J Ollos

comment:5 Changed 11 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 11 years ago by Ryan J Ollos

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

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

comment:7 Changed 11 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 Changed 11 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 11 years ago by Nathan Bird

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 Changed 11 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 Changed 11 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"
  2. Move to new ticket as set as new

Let me know if that can be done. Thanks Lucas

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

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

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:

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

Thanks

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

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

Resolution: fixed
Status: newclosed

Replying to rjollos:

See comment:4:ticket:11000.

Should be fixed in [12863].

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Nathan Bird.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.