Git Product home page Git Product logo

Comments (20)

RaghavRao avatar RaghavRao commented on August 15, 2024

Having the same issue, same load times on every start
all.log

from gg-struggle.

Scott-Lan avatar Scott-Lan commented on August 15, 2024

Same here. faq is somewhat unclear when it says "slow first load".. as in first time you load each launch? or first ever launch with the mod?

from gg-struggle.

RaghavRao avatar RaghavRao commented on August 15, 2024

from gg-struggle.

Scott-Lan avatar Scott-Lan commented on August 15, 2024

thanks for the info, can confirm this as an issue then.

from gg-struggle.

pheizaut avatar pheizaut commented on August 15, 2024

same issue here too any idea how to fix it?

from gg-struggle.

RaghavRao avatar RaghavRao commented on August 15, 2024

from gg-struggle.

cybermelons avatar cybermelons commented on August 15, 2024

hey sorry for the late reply. yes, the load times are slower. With the new caching strategy, we sacrifice some speed for the sake of consistency. By sending out every request, the requests initiated on startup change.

To optimize it, it'd take more fine tuning by analyzing each request which can be time-consuming. So I suggest heading on over to https://github.com/optix2000/totsugeki and trying that out, as long as you're aware that it edits memory.

from gg-struggle.

RaghavRao avatar RaghavRao commented on August 15, 2024

from gg-struggle.

cybermelons avatar cybermelons commented on August 15, 2024

Sure. Take a look at this block: https://github.com/tsaibermelon/gg-struggle/blob/main/server/gg-struggle.js#L102

      // store the response if cache policy says so
      let fetchCallback = this.shouldCache(gameReq.url) ? storeIfExpired : doNothing
      ...
      this.fetchGg(gameReq, fetchCallback)

With this addition in 1.5, we send unconditionally send out the game's request when they were previously dropped on cache-hits, leading to rank updates not registering. During development, I noticed this could change the start-up requests, resulting in a cache-miss to wait for the real server data. But it it doesn't make sense that this change would change the start-up requests if they're cached for a few hours.

It could also be an issue with the reconfigured cache-policy settings. Try editing local.json to change a setting from 5 mins to 3 hours

        "/api/sys/.*": "3 hours",

See if that speeds things up

from gg-struggle.

DJKero avatar DJKero commented on August 15, 2024

Sure. Take a look at this block: https://github.com/tsaibermelon/gg-struggle/blob/main/server/gg-struggle.js#L102

      // store the response if cache policy says so
      let fetchCallback = this.shouldCache(gameReq.url) ? storeIfExpired : doNothing
      ...
      this.fetchGg(gameReq, fetchCallback)

With this addition in 1.5, we send unconditionally send out the game's request when they were previously dropped on cache-hits, leading to rank updates not registering. During development, I noticed this could change the start-up requests, resulting in a cache-miss to wait for the real server data. But it it doesn't make sense that this change would change the start-up requests if they're cached for a few hours.

It could also be an issue with the reconfigured cache-policy settings. Try editing local.json to change a setting from 5 mins to 3 hours

        "/api/sys/.*": "3 hours",

See if that speeds things up

I'm having the same issue and changing that line didn't improve the load time :/

from gg-struggle.

RaghavRao avatar RaghavRao commented on August 15, 2024

from gg-struggle.

DJKero avatar DJKero commented on August 15, 2024

Is the cache being used at all?

On Mon, Aug 9, 2021, 18:19 DJKero @.**> wrote: Sure. Take a look at this block: https://github.com/tsaibermelon/gg-struggle/blob/main/server/gg-struggle.js#L102 // store the response if cache policy says so let fetchCallback = this.shouldCache(gameReq.url) ? storeIfExpired : doNothing ... this.fetchGg(gameReq, fetchCallback) With this addition in 1.5, we send unconditionally send out the game's request when they were previously dropped on cache-hits, leading to rank updates not registering. During development, I noticed this could change the start-up requests, resulting in a cache-miss to wait for the real server data. But it it doesn't make sense that this change would change the start-up requests if they're cached for a few hours. It could also be an issue with the reconfigured cache-policy settings. Try editing local.json to change a setting from 5 mins to 3 hours "/api/sys/.": "3 hours", See if that speeds things up I'm having the same issue and changing that line didn't improve the load time :/ — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#21 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABUBDU2IYIJRKKI3QQEOUBDT4BH6HANCNFSM5BEKAAGA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

It seems that the api/statistics requests aren't being cached or something else is wrong, I tried by going back to the title screen and entering again and all of them are reporting cache miss.

Second login attempt:
example.log

from gg-struggle.

RaghavRao avatar RaghavRao commented on August 15, 2024

Thank you. Yes not a single Hit except one for login... Which means at this point its probably slower to use this than regularly logging on

from gg-struggle.

RaghavRao avatar RaghavRao commented on August 15, 2024

I fixed it. I noticed %TEMP%\gg-struggle\dumps had 13000 entries so I deleted everything in the folder. I also deleted the gg-struggle.db file, and ran the uninstaller and reinstalled.
I then set the cache time for /api/statistics/.* to -1:
local-json.txt

Here is the log for attempt 2:
attempt2.log

Here are my guesses:

  1. 13000 entries clogs up JS look up and it misses even though its there (unlikely, no JS experience however)
  2. "hours" isn't being parsed correctly, and a value in seconds is needed (maybe 3600 instead of -1 is better?)
  3. There is a bug in the code for all positive times

from gg-struggle.

pheizaut avatar pheizaut commented on August 15, 2024

Can confirm Raghavs fix made the game launch almost instantly. I would guess that this brings the rank issues back but Im locked at max rank regardless.

from gg-struggle.

RaghavRao avatar RaghavRao commented on August 15, 2024

from gg-struggle.

DJKero avatar DJKero commented on August 15, 2024

Sure. Take a look at this block: https://github.com/tsaibermelon/gg-struggle/blob/main/server/gg-struggle.js#L102

      // store the response if cache policy says so
      let fetchCallback = this.shouldCache(gameReq.url) ? storeIfExpired : doNothing
      ...
      this.fetchGg(gameReq, fetchCallback)

With this addition in 1.5, we send unconditionally send out the game's request when they were previously dropped on cache-hits, leading to rank updates not registering. During development, I noticed this could change the start-up requests, resulting in a cache-miss to wait for the real server data. But it it doesn't make sense that this change would change the start-up requests if they're cached for a few hours.

It could also be an issue with the reconfigured cache-policy settings. Try editing local.json to change a setting from 5 mins to 3 hours

        "/api/sys/.*": "3 hours",

See if that speeds things up

I think the issue is here:

https://github.com/cybermelons/gg-struggle/blob/main/server/gg-struggle.js#L94

try negating the conditional, like:

if (**!**this.isItemExpired(ggResp))

Tell me if it works!

from gg-struggle.

DJKero avatar DJKero commented on August 15, 2024

Sure. Take a look at this block: https://github.com/tsaibermelon/gg-struggle/blob/main/server/gg-struggle.js#L102

      // store the response if cache policy says so
      let fetchCallback = this.shouldCache(gameReq.url) ? storeIfExpired : doNothing
      ...
      this.fetchGg(gameReq, fetchCallback)

With this addition in 1.5, we send unconditionally send out the game's request when they were previously dropped on cache-hits, leading to rank updates not registering. During development, I noticed this could change the start-up requests, resulting in a cache-miss to wait for the real server data. But it it doesn't make sense that this change would change the start-up requests if they're cached for a few hours.
It could also be an issue with the reconfigured cache-policy settings. Try editing local.json to change a setting from 5 mins to 3 hours

        "/api/sys/.*": "3 hours",

See if that speeds things up

I think the issue is here:

https://github.com/cybermelons/gg-struggle/blob/main/server/gg-struggle.js#L94

try negating the conditional, like:

if (**!**this.isItemExpired(ggResp))

Tell me if it works!

Nvm just saw that it's just a node server, I'm trying it out.
Will edit this message when I know if it works.

Edit:
Nope, it doesn't.
How do I enable the debug messages?

from gg-struggle.

DJKero avatar DJKero commented on August 15, 2024

I've been toying with this issue, and it seems that the statistics keys aren't consistent between launches (maybe they patched client+server to rotate the keys with time?)

from gg-struggle.

RaghavRao avatar RaghavRao commented on August 15, 2024

@cybermelons do you have any updates?

from gg-struggle.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.