ff14-fish-tracker-app icon indicating copy to clipboard operation
ff14-fish-tracker-app copied to clipboard

bug: Pin fish in FFX|V Fish Tracker App takes 2 seconds

Open LunaPg opened this issue 3 years ago • 1 comments

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:

  1. Got to Pin fish in FFX|V Fish Tracker App takes 2 seconds
  2. Click on a fish to pin
  3. 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

LunaPg avatar Nov 08 '21 14:11 LunaPg

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.

icykoneko avatar Nov 13 '21 15:11 icykoneko