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

Closed
Mortvana opened this Issue Mar 6, 2015 · 8 comments

Comments

Projects
None yet
4 participants
@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

This comment has been minimized.

Show comment
Hide comment
@yueh

yueh Mar 6, 2015

Member

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.

Member

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

This comment has been minimized.

Show comment
Hide comment
@TheJulianJES

TheJulianJES Mar 6, 2015

Contributor

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. ;)

Contributor

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

This comment has been minimized.

Show comment
Hide comment
@thatsIch

thatsIch Mar 7, 2015

Member

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.

Member

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

This comment has been minimized.

Show comment
Hide comment
@thatsIch

thatsIch Mar 9, 2015

Member

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

Member

thatsIch commented Mar 9, 2015

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

@thatsIch thatsIch added the type-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

This comment has been minimized.

Show comment
Hide comment
@thatsIch

thatsIch Mar 10, 2015

Member

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.

Member

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

This comment has been minimized.

Show comment
Hide comment
@yueh

yueh Mar 10, 2015

Member

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.

Member

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

This comment has been minimized.

Show comment
Hide comment
@thatsIch

thatsIch Mar 10, 2015

Member

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

Member

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

This comment has been minimized.

Show comment
Hide comment
@TheJulianJES

TheJulianJES Mar 10, 2015

Contributor

Yep, I was about to write this ;)

Contributor

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

Merge pull request #1046 from thatsIch/b-976-version-checker
Fixes #976 Now uses GitHub to retrieve most current version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment