ff14-fish-tracker-app
ff14-fish-tracker-app copied to clipboard
bug: Pin fish in FFX|V Fish Tracker App takes 2 seconds
bug: Pin fish in FFX|V Fish Tracker App takes 2 seconds"
Describe the bug When you pin a fish, it take 2 seconds for the frontend to actually pin the fish, without any backend calls. (Looks like, in the console, it sorts again the whole fishing list)
To Reproduce Steps to reproduce the behavior:
- Got to Pin fish in FFX|V Fish Tracker App takes 2 seconds
- Click on a fish to pin
- Wait for 2-3 seconds
Expected behavior It should be instant
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: Win 8
- Browser : Brave destktop
- Version Version 1.31.88 Chromium: 95.0.4638.69 (Official Build) (64-bit)
Smartphone (please complete the following information):
- N/A
Additional context
- Avoid sort the whole array has it has O(n) complexity.
- Checking the how many redraw has been called with Chrome performance profiler
- Printing in console add some lag in browser
- Maybe minifying code could help a bit
This is a known issue. There have been a few issues completed already that attempt to improve the load times of the site. Currently, as you've noted, the biggest issue is with the redrawing due to all of the rows being present on the page even if they aren't visible. The sorting actually doesn't take all that long (relative to the redraw).
For now, I'll leave this open but the focus will be addressing the redraw part as this is what's actually causing the problems.