rafaelgomesxyz / esgst

An extension that enhances SteamGifts / SteamTrades.
MIT License
147 stars 23 forks source link

Add a loading popup when opening the import/export/delete menus until the data sizes are calculated #372

Closed gizellos closed 6 years ago

gizellos commented 6 years ago

As the title says - opening Delete/Import/Export data pop out is too slow. I have quite fast computer and when I open it (for the first time), it takes a few seconds to open it.

My guess is that the pop out waits for all the sizes before it opens. Is it true? If it is, then I suggest first open the pop out and after it to get the sizes. Don't wait for the sizes. You can temporary show loading icons instead of the sizes.

It was not so slow earlier (I am not sure which version caused it).

rafaelgomesxyz commented 6 years ago

You would still need to wait to do something because the popup would freeze until all sizes are calculated. Is it faster if you open https://www.steamgifts.com/esgst/import, https://www.steamgifts.com/esgst/export and https://www.steamgifts.com/esgst/delete?

rafaelgomesxyz commented 6 years ago

I remember the popup always taking a few seconds for me (2-3). Maybe it was your data size got bigger?

gizellos commented 6 years ago

Yes for me 2-3 seconds too and it is too much according to the fact that all other except the export/import open instantly. You could delay the calculating. Just don't execute the calculating until the pop out is fully loaded. Or calculate it on demand (a button called Calculate sizes)

Is it faster if you open https://www.steamgifts.com/esgst/import, https://www.steamgifts.com/esgst/export and https://www.steamgifts.com/esgst/delete?

It is the same.

rafaelgomesxyz commented 6 years ago

Like I said, it doesn't matter, you wouldn't be able to do anything because the popup would be frozen until the sizes are calculated. Well, that fact is irrelevant because the others don't need to calculate data sizes. And I don't think 2-3 seconds is too much at all, especially since you wouldn't use this that frequently for it to bother you that much, unless you import/export every day? But even then, waiting 2-3 seconds once per day doesn't sound like a big deal to me.

I will see if I can do something, but I already tried one thing and it remained the same, so I don't think there is anything to do. Are you sure it wasn't 2-3 seconds before? It has always been like that for me.

gizellos commented 6 years ago

The time itself is not such a problem. It just a bit confusing and"stressful" when you click on something and nothing happens immediately.

I am not so sure that the time was better earlier, I just believe it because I was never thinking about it before. It can be because I have more data saved as you told me.

A loading icon could help it, though.

rafaelgomesxyz commented 6 years ago

I just installed v7.11.2, which is the one before the version that caused slowdown for some things, and it takes the same amount of time for me.

But I added a loading popup to the latest dev version that gives the illusion that something is happening immediately. Let me know what you think.

rafaelgomesxyz commented 6 years ago

This also game me the idea for #385.

gizellos commented 6 years ago

It's possible that it was faster only before you added the sizes for all sub options. So there is not a version which slowed it down. It is slower just because of the more info the script has to find out. So the issue is invalid, sorry.

But the loader you made is very good and it 100% helped it. The illusion works and I don't have the problem at all anymore. Thanks!