52 | | Please help, my TracTicketChangelogPlugin is still very slow. It takes over 30 seconds for some tickets. If I cannot find a solution I must disable this wonderful plugin. |
53 | | |
| 52 | === SQL experiment 2 |
| 53 | |
| 54 | Next I simply removed the SQL query from code. |
| 55 | Instead I simply assigned fixed values to the variables. |
| 56 | |
| 57 | Result: It did not change the loading time. |
| 58 | |
| 59 | = Genshi |
| 60 | |
| 61 | As far as I know, the plugin is still based on Genshi (see #13283). |
| 62 | |
| 63 | Can this be a performance problem? |
| 64 | |
| 65 | In my log I can see the following warning: |
| 66 | {{{ |
| 67 | Trac[chrome] WARNING: Component TicketLogModule relies on deprecated Genshi stream filtering |
| 68 | }}} |
| 69 | |
| 70 | I experimented with the Python code and could find out that the following line 150 from `filter_stream` function may be responsible: |
| 71 | source:/tracticketchangelogplugin/1.2/ticketlog/web_ui.py#L150 |
| 72 | {{{#!python |
| 73 | stream |= Transformer('//div[@id="ticket"]').after(template) |
| 74 | }}} |
| 75 | |
| 76 | If I disable this line, then as expected the change-log will not appear in the HTML output, but the loading time will be quick. |
| 77 | |
| 78 | = Tickets |
| 79 | |
| 80 | What is confusing is that the loading time problem seems not proportional with the number of change-sets. I have tickets with 300 related SVN change-sets which load faster than other tickets with 150 related SVN change-sets. Also note that our ticket descriptions are often very |
| 81 | |
| 82 | I could not find the pattern, but it seems to be a combination of: |
| 83 | - number of related SVN change-sets |
| 84 | - number of ticket changes (my users often change ticket description) |
| 85 | - length or complexity of ticket description (my users love long description texts with many tables and pictures) |
| 86 | |
| 87 | Just to make this sure, __all__ tickets (even the longest ones) load quickly as soon as I disable the TracTicketChangelogPlugin. |