Zicore / CrossoutMarket

Crossout Market - Prices and Graphs
55 stars 18 forks source link

Suggestion: Enable gzip compression #70

Closed andrewpros closed 6 years ago

andrewpros commented 6 years ago

Hi.

You should enable gzip compression on json data, item chart data is loading quite slow due to downloading json close to 8mb, this is huge for single item, it would be much faster sending gzipped json.

andrewpros commented 6 years ago

@Stiffi136

Why we now have only 1 month of data? Can it be more, like 3? It helps a lot on some item to know their price 2/3 month ago.

Stiffi136 commented 6 years ago

We limited the amount of data because the charts took to long to load up. GZip could help a bit but we think the major limitation is the amount of data which needs to get requested from the DB each time you call the item page. A solution to this problem could be pregrouped data. If we group the data we could give the highest resolution of data for the month and after that the pregrouped data gets sent out.

andrewpros commented 6 years ago

Well ok, but back then when there was months of data on the chart it worked quite good, it started later to be too much. I think 3 months is not that much, especially when u can add this as a non default option, i suppose most would use it sporadically, just as i.

U have said on forums that it works on a vps right? Couldn't u just run redis or something to precache the db data? But if it cant be done then ok, or make at least 2 months just like disable data grouping works, u cant choose more than week by single click, but u can drag the slider to show more than a week.

Stiffi136 commented 6 years ago

Gzip got enabled with 57d61f67aaf9e832f237e04c033f5ab86323b87c Pregrouped data got implemented with 607e3685b600fa53a9a69511e65bb03a795df1cd