nimforum icon indicating copy to clipboard operation
nimforum copied to clipboard

LOAD MORE THREADS button - slows down

Open markprocess opened this issue 6 years ago • 6 comments

Each successive use of LOAD MORE THREADS increases the response time to the click. The first part of the response provides no visual feedback, the second part has a rotating circle. Both parts seem to increase.

On a tablet, this kind of response appears to the user as an erratically responsive button.

markprocess avatar Jun 21 '18 01:06 markprocess

Not sure what you mean? The Load More Threads button seems to take the same amount of time to load each time I click it.

dom96 avatar Jun 21 '18 21:06 dom96

Is there some kind of script that can test and measure this? Some industry tool or maybe nim itself? This would ultimately contribute to nimforum development and testing anyways.

markprocess avatar Jun 22 '18 04:06 markprocess

Well, most browsers have a developer console that features a network graph.

On Chrome at least, you can right-click anywhere on the page, click "Inspect", then click "Network" on the console pane that appears. While the network tab is visible, any network activity for that tab is logged (though this can be turned off through one of the buttons).

I used the above tool to roughly track the amount of time it took to load new entries on the main page of the forum. Below is a screenshot of the results: image

For me, it takes 1.25 to 1.45 seconds to load a new page in the forum. The page loads I performed didn't show any increasing load times.

Some other things to note:

  • Using extensions can effect load time. While my browser does have extensions, it doesn't have any that perform functions such as ad or javascript blocking. Such extensions might increase load time.
  • My computer has 16GB of memory. A mobile device or memory-constrained laptop or desktop might be forced to page stuff to disk, which could also cause performance issues.
  • In Chrome, you can examine the timing components of a single request my mousing over its "block" of time in the "Waterfall" column. The popup that appears lists the amounts of time individual parts of the request took (time to connect, time to first byte, etc).

Varriount avatar Jun 22 '18 05:06 Varriount

Very helpful. I'm learning how to use that visualization tool. The view I get when inspecting the load more threads button gives me the view that I'm looking at. I'm not so sure now about the second half of the response time (maybe that's where there is net traffic,) but after 10 load more threads/scroll/repeat cycles, the delay between click and the start of the rotating circle is easily seen by the naked eye.

I'm on chrome/win10/atom32/2gb/32gbssd and running out of ssd frequently and I have probably 40 tabs open. If I knew how to save the tabs, start empty, test, then restore my tabs I could try that.

markprocess avatar Jun 22 '18 08:06 markprocess

To save tabs, you have two options:

Given the hardware you described, the slowdown is probably due to resource starvation. It might be possible to optimized for this case, however the JavaScript would need to be tuned and tested under the same kinds of conditions.

Varriount avatar Jun 22 '18 09:06 Varriount

This seems like your browser is having trouble handling all those threads at once. I will implement a /p/<page_number> URL so you can view each page individually to combat this.

dom96 avatar Jun 22 '18 09:06 dom96