Opened 11 years ago

Closed 10 years ago

#3624 closed Bug (fixed)

Web client very slow for large number of torrents

Reported by: mjpieters Owned by: kjg
Priority: Normal Milestone: 2.40
Component: Web Client Version: 2.10
Severity: Normal Keywords:
Cc:

Description

With 987 torrents loaded, clicking on the 'Seeding' or 'All' filter buttons hangs the browser for several seconds every time.

A quick profile shows that on every re-filter, all the matched torrents have their HTML rebuilt; over 70% of the time is spent in Torrent.refreshHTML. Can this be avoided somehow? Surely selectively displaying a subset of all torrents doesn't need to rebuild them all, why not just set their CSS display value back to block?

Change History (19)

comment:1 follow-up: Changed 11 years ago by charles

@mjpieters: Gearbox is under consideration to replace the existing web client. Could you give it the same stress test and report back?

comment:2 in reply to: ↑ 1 ; follow-up: Changed 11 years ago by mjpieters

Replying to charles: Giving it a try now. Somewhat non-pretty, but performs much better. I cannot close the dialog boxes though.

comment:3 in reply to: ↑ 2 ; follow-up: Changed 11 years ago by charles

Replying to mjpieters:

Giving it a try now. Somewhat non-pretty

Agreed.

but performs much better.

Agreed.

I cannot close the dialog boxes though.

The big X in the corner doesn't work?

comment:4 follow-up: Changed 11 years ago by charles

Actually, after looking over Clutch again, there are a few trivial performance improvements that can be made in Torrent.refreshHTML(). Does r11305 make things better, worse, or no change according your profiling of Clutch?

comment:5 in reply to: ↑ 3 Changed 11 years ago by mjpieters

Replying to charles:

The big X in the corner doesn't work?

Ah, clicking in the top-right cornerw works. The big X is missing:

  GET http://localhost:9093/transmission/web/gearbox/images/window-close.png HTTP/1.1

  404 Not Found

comment:6 in reply to: ↑ 4 Changed 11 years ago by mjpieters

Replying to charles:

Actually, after looking over Clutch again, there are a few trivial performance improvements that can be made in Torrent.refreshHTML(). Does r11305 make things better, worse, or no change according your profiling of Clutch?

Trunk doesn't make much difference, it seems. Profiling with Chrome feels a little hit and miss, I'd take my results with a pinch:

  • 2.10 takes some 21.4 seconds (70% spent in refreshHTML, 26% in 'program', presumably DOM ops).
  • trunk takes the same time, now with 84% spent in refreshHTML, almost 12% in 'program'.

comment:7 Changed 11 years ago by charles

It must be in the DOM operations where we poke the className and style properties, then.

comment:8 follow-ups: Changed 10 years ago by jordan

I'm not seeing this in Chrome or FF4 beta 10... both load over 1000 torrents in under 5 seconds.

Does this problem persist for you?

comment:9 Changed 10 years ago by jordan

  • Resolution set to worksforme
  • Status changed from new to closed

We are closing this bug report because it lacks the information we need to investigate the problem, as described in the previous comments. Please reopen it if you can give us the missing information, and don't hesitate to submit bug reports in the future. Thanks again!

comment:10 in reply to: ↑ 8 Changed 10 years ago by mjpieters

  • Resolution worksforme deleted
  • Status changed from closed to reopened

Replying to jordan:

Does this problem persist for you?

Very sorry for the late reply.

Yes, the problem persists still, but only for the compact view. So select the 'Compact View' option from the settings menu bottom left, and try to switch around the filters, especially to 'All'.

De-activating the Compact View makes everything better again.

comment:11 in reply to: ↑ 8 Changed 10 years ago by mjpieters

Replying to jordan:

Does this problem persist for you?

(Due to comment moderation I cannot comment on my own response just now, this is a follow-up to what I presume will be comment:9).

I of course conveniently forgot that I had switched back to Transmission 2.13 (I'm affected by #4035), so the performance problem I see may well have been resolved in 2.20.

If you can reproduce this in 2.13, and 2.20 solves it, this can be closed.

comment:12 Changed 10 years ago by jordan

I hadn't tested the compact view, so I'll have to try that out. Thanks for the suggestion.

comment:13 Changed 10 years ago by livings124

#4337 is a duplicate of this.

comment:14 Changed 10 years ago by jordan

  • Milestone changed from None Set to 2.40

The problem is that the way we do compact mode is very, very slow. Compact mode needs to be reworked.

This is harder than it sounds because of the unnecessarily tight coupling between the model and the view in this code. But maybe this is an "opportunity" to clean that up too :)

comment:15 Changed 10 years ago by jordan

  • Resolution set to fixed
  • Status changed from reopened to closed

Fixed in r12690. The time to load 1000 torrents in the browser in compact mode has gone from 50 seconds to 3 seconds on my computer.

comment:16 follow-up: Changed 10 years ago by mjpieters

Trying the patch now, by linking it into my active 2.33 installation. Although very fast, all the torrents are marked as having status 'error'.

I note that there is at least one error in the patch; line 1837 onRowClicked takes arguments ev and row, but the function itself uses event and thus errors out. Fixing that I can at least view torrent details in the inspector panel.

I'll presume that the error state I see is due to me using 2.33 instead of trunk, I take it that the protocol to communicate the torrent state has changed?

comment:17 Changed 10 years ago by livings124

  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:18 in reply to: ↑ 16 Changed 10 years ago by jordan

Replying to mjpieters:

Trying the patch now, by linking it into my active 2.33 installation. Although very fast, all the torrents are marked as having status 'error'.

The RPC statuses have changed post-2.33 in order to accommodate queuing. You'll need to run with a nightly build as the server.

I note that there is at least one error in the patch; line 1837 onRowClicked takes arguments ev and row, but the function itself uses event and thus errors out. Fixing that I can at least view torrent details in the inspector panel.

Interesting! I'm not seeing that error here. It looks like 'event' is a global variable on some browsers which masked the error. Thanks for reporting this.

comment:19 Changed 10 years ago by livings124

  • Resolution set to fixed
  • Status changed from reopened to closed
Note: See TracTickets for help on using tickets.