rejetto / hfs

HFS is a web file server to run on your computer. Share folders or even a single file thanks to the virtual file system.
GNU General Public License v3.0
2.29k stars 227 forks source link

0.52.0-beta5 Performance issues #523

Closed de7ang closed 7 months ago

de7ang commented 8 months ago

After I discovered and resolved the issue with the buttons not being clickable (in 0.52.0-beta5 and the first preview version you provided me), there has been a significant decrease in performance. Compared to version 0.51.3, when accessing the web page for the first time, it takes a long time to load, sometimes even more than a minute with the spinning circle.

de7ang commented 8 months ago

Version 0.52.0-beta5 remains in this state for several tens of seconds, whereas version 0.51.3 takes less than a second. image

The version you first provided me with to fix the button issue also experiences the same slow loading problem when opening the page. image image

rejetto commented 8 months ago

ok i think i've solved it 0.52-beta5.8

de7ang commented 8 months ago

image The first time opening the page is still very slow. This is a Hyper-V virtual machine, but the speed in the official version is very fast.

rejetto commented 8 months ago

what if you refresh after it has loaded?

de7ang commented 8 months ago

After successful loading, refreshing would require reloading the same amount of time.

rejetto commented 8 months ago

can you give me a link to your HFS? even privately if it's not public a@rejetto.com

is it working for you on Windows 7 ? I thought it was not possible

de7ang commented 8 months ago

The server is set up on an internal network without internet access, so you can't access it. I temporarily set up servers for versions 0.52-beta5.8 and 0.51.3 on the host machine and tested them using a Win7 virtual machine. You can watch the recorded video, and there is a significant speed difference. However, when using a Win10 virtual machine, the speed is normal. Therefore, the issue should be due to Win7. image

https://github.com/rejetto/hfs/assets/108105714/730ed19c-0aee-4695-b577-7d21b05471e9

rejetto commented 8 months ago

i don't feel like dismissing this problem, and i don't think win7 is the problem. let's investigate a bit on it. i see in your video that you are not using the same config, as there's a config.yaml file in 0.52 and none in 0.51. please try the following

  1. run with same configuration (you can copy the config, or remove the config from 0.52, whatever you prefer)
  2. see if beta4 has the problem https://github.com/rejetto/hfs/releases/tag/v0.52.0-beta4
de7ang commented 8 months ago

This time, I've placed the server within a simpler network Win10 virtual machine. The loading speed in the beta version has improved significantly, with Win7 loading in under 5 seconds. While Win10 displays a spinning action, it lasts less than 1 second. After refreshing, the loading speed remains the same. This scenario persists in both beta4 and beta5. In the official version, the spinning action never occurs under any circumstances.

rejetto commented 8 months ago

it's strange, these are my timings when accessing my HFS over local wifi, with cache disabled

image
de7ang commented 8 months ago

I think I've identified the problem. Only clients with internet access privileges can load from the beta server quickly. Clients without internet access experience slow loading issues, even though the server is not connected to the external network at this time.

de7ang commented 8 months ago

I suspect that the beta server instructs the clients to fetch some information from the external network first.

rejetto commented 7 months ago

I think I've identified the problem. Only clients with internet access privileges can load from the beta server quickly. Clients without internet access experience slow loading issues, even though the server is not connected to the external network at this time.

ok, this is enlightning! i now know why. it is trying to load an internet file, indeed. i will work on it.

rejetto commented 7 months ago

0.52-beta5.96 this version is supposed to fix the problem. would you please give it a try?

rejetto commented 7 months ago

in the meantime i decided to release beta 6, which include this fix of course

de7ang commented 7 months ago

0.52-beta5.96 fixed this issue. nice work!