[mythtv-users] Web interface scalability issue: Video Gallery
Paul Harrison
mythtv at mythqml.net
Wed Sep 6 21:01:17 UTC 2023
On 06/09/2023 20:26, Peter Bennett wrote:
>
> On 9/6/23 12:54, Jan Ceuleers wrote:
>> On 03/09/2023 23:08, Peter Bennett wrote:
>>> Thanks for testing this. I have about 1500 videos (on hard drive)
>>> and it takes between 1 and 2 seconds. With 5500 videos I would
>>> expect no more than 7 seconds.
>>
>> I just timed it again: it took 50 seconds.
>>
>>> I can investigate using a lazy load for videos. That may conflict
>>> with the directory listing scheme I have, where directories are
>>> listed and you can drill down.
>>>
>>> Do you use directories?
>>
>> I do use directories, yes. Lots of them:
>>
>> * The top level is alphabetic in groups (0-9, A-B, C-D, E-F, G-H,
>> I-J, K-L, M, N-O-P-Q, R-S, T, U-V-W-X-Y-Z). So 12 directories at
>> the top level.
>> * The above directories contain movies, but also subdirectories
>> (for TV box sets).
>> * The TV box set directories can contain subdirectories for each
>> season. Single-season series don't have these subdirectories.
>>
>>> When it takes a long time, how many rows are reported (at the top
>>> level each direcory is a row)?
>> Not sure what you're asking. Is there an incantation I should run to
>> produce the answer?
>>>
>>> Does clicking on a directory to see its contents also take a long time?
>> No, that is instant.
>>>
>>> Does clicking back on Videos at the top after looking at a
>>> subdirectory also take a long time?
>>
>> No.
>>
>> Many thanks, Jan
>>
>>
> Please try this, to see if the slowdown is on the backend:
> curl "http://localhost:6544/Video/GetVideoList?Sort=FileName" >/dev/null
>
> On my laptop it reports time spent 0:00:01 with over 7000 videos in my
> database.
>
> If you are running your browser on a different computer from the
> backend, then try from that computer:
> curl "http://backend:6544/Video/GetVideoList?Sort=FileName" >/dev/null
>
> Look at the Time Spent. This will tell if it is a slowdown in the network.
>
> Peter
>
>
You should also be able to use your browsers debug tools to see how long
each network operation takes as well.
Big disclosure I haven't been able to test the latest WebApp but when
Stuart and I started the initial development the WebApp was very fast
but as we added more stuff it started to slow down dramatically for me
but not for Stuart! I was seeing regular delays of 10 to 15 seconds to
update the screen. We never figured out why I was seeing it and not
Stuart or what the cause was. Angular does shift most processing to the
client end ie the machine running the browser rather than what is more
traditional with stuff like php where most of the processing is done at
the server end. At the time I was using a 16 core Ryzen 7 so it can't be
lack of processing power on the client end. I was running the BE in a
ESXI virtual machine which may have contributed to the slow down since
the WebApp does sent many requests to the backends services API but I
never found any evidence to support that idea.
If Jan is seeing many of the screens showing very slow update times then
she may be seeing the same thing I was. If it's just one screen then
it's likely something else. One thing you need to know with Angular is
that it is basically one giant web page that has the entire WebApp on
it. Angular just hides and shows stuff based on what the user clicks on
once the page is loaded. It does mean that the initial loading is always
slow since the browser has to pull the several hundred megabyte? of data
for the entire WebApp before it shows the page you want. At least that
is the way I believe it works.
Paul H.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20230906/361b8450/attachment.htm>
More information about the mythtv-users
mailing list