PDA

View Full Version : PrimeGrid Subproject Sorting



Emoga
03-03-2020, 02:50 PM
Hey Bok,

Is there a way to add sorting to the 'Today' and 'Yesterday' column within the 'Primegrid Subproj Stats' pages?

For example:The PrimeGrid Cullen page (https://stats.free-dc.org/subproj/pgrid/CUL).

Would this be easy to implement? or is it a complete nightmare due to re-writing a bunch of code?

Bok
03-03-2020, 04:29 PM
It actually has that sorting... IF the result set is below 5000, as it's then all loaded into memory and you sort locally. When the result set is over that I have to do serverside sorting, which means adding a bunch of indexes and constructing the SQL based on that which is a little more work.

I can certainly alter that 5000, but it might slow it down if you are on low bandwidth. I'm not worried about the bandwidth here since I upped it to a 1Gbps up/down last year. Let me know, I could just change it on stats6 for instance but leave it at 5000 on the main stats

Emoga
03-03-2020, 06:12 PM
By 5000 you mean 'entries' right? if so, it looks like it would take around 25-30k to cover the majority of sub-projects. Is that too much? (no bandwidth problems here either)
I don't mind if its only on stats6, as I'm probably one of the few who visit these pages.

I can always live with the 'Last Update' column if its too much of a hassle.

Bok
03-04-2020, 09:06 AM
hmm, take a look at stats6 now. I made a few tweaks to the sql. You can sort on yesterday and today now, though it only shows those rows that have data in that particular column which might actually be the preferred goal anyway.

While it's not using an index for the sorting on those columns as they are derived fields (I could create a view and use that if necessary) given the result sets are still fairly small I think it's ok. Runs pretty quick for me anyway, but I'm on the same network as the server.

If it seems to be working ok, I can push this over to the main stats too.

Emoga
03-04-2020, 10:34 AM
Works great for me. Thanks!
:cheers: