Page 1 of 1

Make the games list/filters using JavaScript ony

Posted: 19 April 2020, 11:47
by Adrian2k7
Hi,

Currently the games overview page and filters make a request to the server, whenever a user starts filtering. This is propably unnecessary.

From what I see, you could reduce load, following an approach like this:

* Load the users games information (favorites,...) into local storage/ cookie (refresh from time to time, on change)
* Let the overview page and filters work in JavaScript only --> so no need for additional filter requests...

There are many JS libs for doing so, Isotope is a nice one: https://isotope.metafizzy.co

Re: Make the games list/filters using JavaScript ony

Posted: 19 April 2020, 11:51
by Adrian2k7
Wasn't aware, there is a bug tracker. Created a ticket there as well: https://boardgamearena.com/bug?id=15900
Hope this is okay.

Re: Make the games list/filters using JavaScript ony

Posted: 19 April 2020, 12:27
by Een
Hey! Thanks. That's a good idea in general terms, but these requests actually don't contribute so much to the load. Our next bottlenecks to handle are elsewhere :)

As you seem technically minded, if interested you can take a look at this thread where we post updates on our efforts to expand the service capacity: viewtopic.php?f=5&t=14725

Re: Make the games list/filters using JavaScript ony

Posted: 19 April 2020, 13:39
by Adrian2k7
Hello Een,

Yeah, that's more like a drop in the bucket... maybe depends what users do... but propably game logic is the most invasive task.

Generally you may improve a little bit, by doing more REST requests only returning JSON, and doing rendering at the frontend.
This may "remove" the templating from the backend and reduce bandwidth usage a bit... but also depends on the backend, I don't know.

I will respond in the main thread too...