Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

appeng.serivces.VersionChecker (almost) constantly checking for updates. #976

Closed
Mortvana opened this issue Mar 6, 2015 · 8 comments
Closed
Assignees
Labels
bug
Milestone

Comments

@Mortvana
Copy link

@Mortvana Mortvana commented Mar 6, 2015

While playing a slightly modified version of ME^4 (Added TD, XR, CC, and BM), as I was experiencing some lag (likely Fluxed Crystals' fault) so I took a CPU profiler snapshot with sfPlayer1's Sampler. In the roughly 10-15 minutes of sampling, appeng.services.VerionChecker.run() and .sleep() had been invoked 140,895 times each. While it may be on its own thread, it still takes up CPU time, and was invoked far too often, 10 times, 5 seconds apart would be smarter in my opinion. It might be that my internet has been unreliable lately, or that my 2 year old A10 is dying, but ever little thing helps.
-Mortvana

@yueh
Copy link
Member

@yueh yueh commented Mar 6, 2015

The VersionChecker will only check every 4 hours, this is even preserved between restarts of the client.
If it is really called that often, then something externally is forcing it to wake up.

@TheJulianJES
Copy link
Contributor

@TheJulianJES TheJulianJES commented Mar 6, 2015

I don't think it's necessary to check while the client is running, 4 hours is probaly okay but is this really necessary? Check on startup might be enough since you can't update while the client is already running. ;)

@thatsIch
Copy link
Member

@thatsIch thatsIch commented Mar 7, 2015

You can disable the version checker in the configs. We might need to rewrite that anyways, for example by using the Git Tags. If the version checker is able to connect to the internet, it should shut up though and "un-thread" itself.

@thatsIch
Copy link
Member

@thatsIch thatsIch commented Mar 9, 2015

ok, the feeds server is down... soo runs away

@thatsIch thatsIch added the bug label Mar 10, 2015
@thatsIch thatsIch self-assigned this Mar 10, 2015
@thatsIch thatsIch added this to the rv2 milestone Mar 10, 2015
@thatsIch
Copy link
Member

@thatsIch thatsIch commented Mar 10, 2015

sadly the API of GitHub only provides latest releases, not pre-releases, so we are stuck parsing the tag or pre-release list.

I think about shutting the Thread down, if the information can not be retrieved on first try. No reason to hold onto an extra thread, just to post that information to the VersionChecker mod 4h later on.

@yueh
Copy link
Member

@yueh yueh commented Mar 10, 2015

The API is also rate limited to 60 Request/Hour per IP for unauthenticated users.
For most cases this should not be an issue, but we had to deal with it. As some crap ISPs put their users behind a NAT.

The version checker also does only monitor stable releases. So quite contrary to our actual release cycle. So it is mostly useless for now.

@thatsIch
Copy link
Member

@thatsIch thatsIch commented Mar 10, 2015

yea, I intended to put it into a config with default set to beta channel. This should be good, anyone who wants can set it to track alpha too

@TheJulianJES
Copy link
Contributor

@TheJulianJES TheJulianJES commented Mar 10, 2015

Yep, I was about to write this ;)

@thatsIch thatsIch closed this in 6baf952 Mar 17, 2015
thatsIch added a commit that referenced this issue Mar 17, 2015
Fixes #976 Now uses GitHub to retrieve most current version
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.