Procurement-PoE / Procurement

Path Of Exile Character & Stash Management Tool
Artistic License 2.0
331 stars 133 forks source link

Taking forever to log in (throttling because of high stash count) #1082

Closed miva2 closed 9 months ago

miva2 commented 4 years ago

Hi, I'm about to start using Procurement ( I think I have used it in the past). It takes incredibly long (about 10 minutes) to boot the program because I have a high amount of stash tabs and it reaches the rate limit of the API. Not sure if this is because it is my first time using Procurement or if it does this every time on log in.

I would like it to start already even if not everything is loaded in yet. Here's a screenshot Procurement_throttling In this case it started loading my hardcore stash tabs but I was only interested in Standard stash tabs.

I would find it useful if I could give priority to one league ( either current league or choose with dropdown) so that I can start using Procurement before everything is loaded in yet. Would be useful if it keeps loading in the background.

I have found this PR which looks related.

thailyn commented 4 years ago

Hi, thanks for reaching out. The GGG API that Procurement (and all other PoE programs) uses allows only a limited number of requests per minute, and this limit is pretty small (~40/minute). Procurement keeps track of how many requests it is making, and pauses before it would go over the limit. So, if you have some leagues with a large number of tabs (such as accumulating remove-only tabs from previous challenge leagues), Procurement can take a while to refresh everything.

There are two things you can do to speed up Procurement. First, you can uncheck that "Refresh on Login" check box. When you do that, Procurement will not refresh any league/character information or tabs, and will quickly finish the loading process. You will then need to manually refresh your [used] tabs to update the tab contents. However, if there is a new league (such as a new challenge league starting) or you modified tab names/colors/etc., you must enable "Refresh on Login" to pick up those changes. This is a limitation in Procurement that I hope can be fixed.

Second, you can enable the option in Procurement to download only specific leagues. After you finish logging in to Procurement (with "Refresh on Login" enabled so Procurement knows about all the current leagues), you can go to the Settings tab, enable "Download Only Selected Leagues", and then select the leagues you are interested in. For example, to only download the Metamorph stash tabs, you can do:

image

Please note that, due to another limitation in Procurement (that I would also like to see fixed), you will need to enable "Refresh on Login" at least once before new leagues (like Metamorph) will show up in this list of leagues. You can modify the Settings.xml file to enable this setting and customize the list of leagues to download, but Procurement must know about a character from that league (which it does when "Refresh on Login" is enabled) before it will selectively download its tabs.

So, in summary, I would recommend letting the initial "Refresh on Login" login complete once, then going to the Settings tab to have Procurement only download the leagues you want. Then, if you want even faster logins, disable "Refresh on Login" and only manually refresh your tabs when you want them to be refreshed.

Hope that helps! Please let me know if you have other questions or run into other issues.

miva2 commented 4 years ago

Thank you for your reply! That is definitely helpful. Ideally it would let me in with only a few updated stash tabs and then automatically update the rest in the background. That would be nice to see in an update.

I can see why the initial "Refresh on Login" is required. Doesn't GGJ have an API that returns all stash tab names of an account? After reading your response, I think they should.

thailyn commented 4 years ago

Ideally it would let me in with only a few updated stash tabs and then automatically update the rest in the background. That would be nice to see in an update.

Yeah, I agree, it would be nice if Procurement could update tabs without stopping you from using the app.

Doesn't GGJ have an API that returns all stash tab names of an account? After reading your response, I think they should.

It is possible to make Procurement more robust, so it could recognize new leagues during any stash tab update, and get the updated tab names/colors/etc. for a league when refreshing tabs. Its current implementation is just a more conservative way of handling these updates. It's another feature I'd like to work on eventually.

Also, it's teeeechnically possible in the latest version to have Procurement automatically trigger refreshing tabs when you change zones. It still has some memory leaks I haven't fixed yet (thus slowing down Procurement gradually until it is restarted), though, so it's not enabled by default nor documented anywhere yet.