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

Disable asset and item templates requests on login. #2243

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

neskk
Copy link
Contributor

@neskk neskk commented Aug 7, 2017

Description

It defeats a bit the purpose of having them in the first place but when you're running a tight on RPM it can potentially save you from a bottleneck.

Motivation and Context

Run instance with -nar, --no-asset-requests to disable these requests.

How Has This Been Tested?

Local instance.

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@Alderon86
Copy link
Contributor

we should store them in the database instead of disabling it, so other workers can reuse the values.

@neskk
Copy link
Contributor Author

neskk commented Aug 7, 2017

It would be a waste of db operations, I've thought about saving them in a json file, similarly to what node pogo api does, but afaik these values aren't used anywhere. Maybe on complete_tutorial we can assert the model's URL but that almost never changes.
If we start using these values for anything then we should store them, otherwise disabling them can help save a some RPMs.

@sebastienvercammen
Copy link
Member

sebastienvercammen commented Aug 7, 2017

Adding comments from Discord:

[1:19 AM] Uncle Sebby: @Alderon86 I already have it on my list to add abstraction to the client requests to store account data (e.g. asset time, template time, the 32 requests) in a local cache folder (cache data per account, just md5 the account name for a filename). Having added pgoapiwrapper and pgoapirequestwrapper makes this super easy. Definitely filesystem over DB.
[1:19 AM] Uncle Sebby: You can pick it up though, I'm still in Vienna till the evening of the 9th.

The requests should be complete, but only done once where possible.

@michikrug
Copy link
Contributor

I am storing the timestamps for each account in a JSON file on the disk so that the accounts only do the requests if actually something was changed. Thus, fresh accounts do it once and if nothing changes never again and additionally, it also survives restarts of the instance.

@neskk neskk force-pushed the pr-no-asset-requests branch 5 times, most recently from ede3e97 to a700fd2 Compare January 23, 2018 02:08
@neskk neskk force-pushed the pr-no-asset-requests branch 2 times, most recently from 9ae1c59 to 8c825bc Compare January 25, 2018 19:58
@neskk neskk force-pushed the pr-no-asset-requests branch 2 times, most recently from 61b870a to 81e7ccc Compare February 2, 2018 05:20
@neskk neskk force-pushed the pr-no-asset-requests branch 5 times, most recently from 31af424 to 4119a71 Compare March 8, 2018 19:36
…gin phase.

This can save a lot of requests - up to 25 requests - per new unique account login.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants