Im using phonetrack with nextcloud (from 12, now 13).
When I open phonetrack nextcloud app, its saying loading possitions. And hang ( froze). Click to page icons not working, nothing till possitions are loaded and map shown.
Can it be, that it is nginx config issue? Can you help me (some settings that can help)?
On desktop there isnt visible problem - no froze.
Mobile - chrome android.
It's not very clear. The browser freezes until everything is loaded and then works normally ? Or does it stay frozen forever ?
It's normal the browser freezes when adding a lot of points. This has no relation with the web server.
If you want to avoid this freeze time on page load, you can activate filters in PhoneTrack so that fewer points are going to be loaded on page load. For example you could only display last 7 days.
What do you mean by "On desktop there isnt visible problem" ? Do you mean the freeze time happens only on mobile ?
@jookk : Your mobile device is just slower than you desktop computer. I guess you have a lot of points, which does not help.
@Happyfeet01 : Your file is huge. It's normal that takes time.
First, PhoneTrack imports the file on the server side. During this time, PhoneTrack's web interface (client side) should not freeze because it's doing nothing but to wait. Then the session is added and not selected. It should not freeze neither. Then, if you select the freshly added session, points are loaded and displayed. At this moment it's normal that it freezes if you have a lot of points.
My questions are :
When does it freeze ? What action causes the interface to freeze ?
By "freeze", do you mean the interface does not respond to any mouse/keyboard action or just that nothing happens but it's working fine ?
Does your Nextcloud instance uses SQLite, MySQL or PostgreSQL ?
I think it's possible to improve performance and also to display more information when it's loading or importing in user interface. I'll keep you informed here. Thanks to you both for the feedback.
The data sent on the network to transmit positions is now 30% smaller => faster loading
when importing a gpx file, points are now added to the database by packets of 500. This is much faster
while loading a lot of points, if the session is deselected, the network query is canceled
there are much less things done with slow DOM manipulation. It's much faster to add many points
tooltips and popups are not generated in advance anymore. They are generated when they are needed. This makes session loading 10 times faster !
Could you try the latest master branch state with your sessions to tell me if you feel the difference ?
I will make more tests soon to check everything is working fine and to measure the global speed improvements.
Julien Veyssierchanged title from browser hangs to Performance issue : slow javascript and controller on import and positions refresh
changed title from browser hangs to Performance issue : slow javascript and controller on import and positions refresh
Julien Veyssierchanged title from Performance issue : slow javascript and controller on import and positions refresh to Performance issues : slow javascript and controller on import and positions refresh
changed title from Performance issue : slow javascript and controller on import and positions refresh to Performance issues : slow javascript and controller on import and positions refresh
Yes, delete "phonetrack" in apps directory, download the master archive, extract it, rename it to "phonetrack" and put it in the "apps" directory of nextcloud. There's no need to do anything in Nextcloud'd application management interface. Just refresh PhoneTrack with CTRL+F5 to be sure you empty the browser's cache and you're good to go.
You could also use git to clone it, then you would be able to update it with one command instead of doing the previous procedure all over again.
Another performance improvement ! This one is bigger than all the others together : PhoneTrack is now 16x faster on filtering, whatever the number of points to filter.
So I git cloned. (your repo helped me to do that)
I tried loading phonetrack on two diferent phone models (android chrome) and there is noticably better performance, quicker loading. Good work! Desktop (chrome) is as flying plane :D
I have the same issue even with filter set to a single day, have multiple users uploading their position on my nextcloud phonetrack instance. Will be very good to load the points and display them progressively without freezing the browser. Looking forward to get this fix released.
@dan-cristian you can get it before the official release by cloning the git repository or downloading the master branch archive. Your feedback could help a lot. Anyway i'll probably publish a new release today.
Even if the points are loaded progressively, i can't avoid the cpu load to increase when a huge bunch of them are added to the map. On my machine (i5 with latest Firefox) i can now load 70000 points in less than half a second (without considering download time). It was taking me more than 10 seconds before the latest performance improvements.
Download time is also more than 50% reduced. My 70000 points represented a 12Mo transfer and now it's 5Mo.
I'm interested in knowing if it still freezes a lot when you load your points.
I just downloaded the master archive (0.2.0) and the loading speed is way much better, I get 20000 positions (5 days) loaded in 5 seconds.
There is one case probably not yet handled - if you uncheck by mistake the filter box all the positions saved in the database will try to load, guaranteed freeze for a while, can you add some sort of warning to avoid an accidental uncheck & freeze?