Author Topic: Overall Stats Ranking  (Read 8462 times)

0 Members and 1 Guest are viewing this topic.

Offline bejacob

  • Full Member
  • ***
  • Posts: 224
  • Last Login:Yesterday at 02:11:51 pm
Overall Stats Ranking
« on: April 10, 2019, 09:26:49 pm »
Curious if there is any plan to change the TBD on the ranking of the overall stats part of the page. Not something that matters as I would consider it a low priority. Just wondering.

Offline yakra

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 4300
  • Last Login:Today at 08:19:36 pm
  • I like C++
Re: Overall Stats Ranking
« Reply #1 on: July 11, 2019, 01:37:26 pm »
There's been a GitHub issue for some time now. It pops back up in discussion every now again, but making a fix never seems to gain much traction.
Quote from: Thing342
FYI: doing this only from the web side results in massive queries that take awhile to process.
Doesn't seem to me this should matter too much, at least in the case of a "Distance Traveled" ranking; we already use a query to get that very same info on http://travelmapping.net/stat.php
Sri Syadasti Syadavaktavya Syadasti Syannasti Syadasti Cavaktavyasca Syadasti Syannasti Syadavatavyasca Syadasti Syannasti Syadavaktavyasca

Offline yakra

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 4300
  • Last Login:Today at 08:19:36 pm
  • I like C++
Re: Overall Stats Ranking
« Reply #2 on: July 13, 2019, 08:04:56 pm »
I see what Thing342 means now. The query I'm using takes 1.3s, compared with 0.16s for the next slowest I saw, with everything else < 0.1s.
Double that, for one active & one active+preview query, and ouch.

I'll leave this on my own mirror of the site, maybe even make a commit to a separate branch, but not open a pull request just yet.
Eventually I may look into extra tables that can be created during the site update process to speed up the queries.
« Last Edit: July 13, 2019, 08:50:17 pm by yakra »
Sri Syadasti Syadavaktavya Syadasti Syannasti Syadasti Cavaktavyasca Syadasti Syannasti Syadavatavyasca Syadasti Syannasti Syadavaktavyasca

Offline Jim

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 2807
  • Last Login:Today at 05:31:40 pm
Re: Overall Stats Ranking
« Reply #3 on: June 07, 2024, 09:02:56 pm »
I've got an implementation of the rankings on the user pages installed on the staging site (https://tmstage.teresco.org).  It's really slow, but I think it's worth that tradeoff.  I have some ideas how to improve efficiency but they likely involve new values being stored in the DB and changes to the site update process to compute and store those values.

Let me know what you think in this thread or in the relevant GitHub issue (https://github.com/TravelMapping/Web/issues/91) and I will decide if and when to get this over on the main site.

Offline Jim

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 2807
  • Last Login:Today at 05:31:40 pm
Re: Overall Stats Ranking
« Reply #4 on: June 08, 2024, 11:40:52 am »
I think I've got a way to fix the efficiency in the works (and a fix for the incorrect percentages now being shown on tmstage for routes traveled and clinched).

Offline Jim

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 2807
  • Last Login:Today at 05:31:40 pm
Re: Overall Stats Ranking
« Reply #5 on: June 08, 2024, 02:30:15 pm »
A more efficient version has been tested on the development and staging servers, so I am installing on the main site.  Let me know if you see any problems with it.

Offline michih

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 4670
  • Last Login:Today at 11:20:52 am
Re: Overall Stats Ranking
« Reply #6 on: June 08, 2024, 02:50:47 pm »
A more efficient version has been tested on the development and staging servers, so I am installing on the main site.  Let me know if you see any problems with it.

Thanks. I'm currently #3 for routes traveled and routes clinched. mapcat is #1 for both, vespertine #2, oscar #4, charliezeb #5.

HOWEVER: Distance traveled is fukced up now! mapcat is indicated being #21 only! https://travelmapping.net/user/?u=mapcat&units=miles I'm #13 instead of #14.
« Last Edit: June 08, 2024, 03:01:37 pm by michih »

Offline Jim

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 2807
  • Last Login:Today at 05:31:40 pm
Re: Overall Stats Ranking
« Reply #7 on: June 08, 2024, 03:22:13 pm »
Thanks - I see the problem, hopefully a quick fix this evening.

Offline Jim

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 2807
  • Last Login:Today at 05:31:40 pm
Re: Overall Stats Ranking
« Reply #8 on: June 08, 2024, 04:19:24 pm »
Better?

Offline michih

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 4670
  • Last Login:Today at 11:20:52 am
Re: Overall Stats Ranking
« Reply #9 on: June 09, 2024, 11:47:21 am »
Yep, thanks :)