Replies

Oct 17, 2017 8 years ago Official
Amber
is bitter
User Avatar
Taco

We'll expand later, but yes the vault does cause a lot of lag that we put a caching system on it. The vault and the wardrobe were both big parts of why the site was dying the past few days. I'm working right now on moving it to 5 minutes; you should notice it in the next hour or so the changes.

Oct 17, 2017 8 years ago Official
Amber
is bitter
User Avatar
Taco

Quote by jensen
maybe the vault cache changes could be bundled into the siteupdate post was planning on doing? if he or anyone else is still planning on doing one, that is. there&;s been a lot going on so i understand if that&;s like, low-tier priority rn but i&;m still curious as to what all went on this weekend o:

I'm having do a quick note in a news post she'll be doing soon (that is unrelated to vaults, but at least people will see it). I'm sure Keith will cover it in his thread too!

Oct 18, 2017 8 years ago Official
Bug
User Avatar
Segfault

Are you guys still having issues with the vault being cached? Keith just pushed some changes that should cause the cache to work correctly now. To test it, I've tried moving things into different categories, as well as removing items from the vault, and it's updating immediately and correctly for me. Could you please let me know if it's working now for you?

I'll be back in a bit with a better explanation about the caching and what was going on with it (based on what I know - I haven't looked at it yet personally) I understand this was a frustrating issue.

🐝 ☕ bug (he/him) | your friendly neighborhood code wrangler. stay in the loop! join and check out the latest admin post highlights

Oct 18, 2017 8 years ago Official
Bug
User Avatar
Segfault

Can you give a specific example/instructions I could use to try and reproduce what you are seeing?

🐝 ☕ bug (he/him) | your friendly neighborhood code wrangler. stay in the loop! join and check out the latest admin post highlights

Oct 18, 2017 8 years ago Official
Bug
User Avatar
Segfault

Thank you. I'm working on a fix for that right now!

🐝 ☕ bug (he/him) | your friendly neighborhood code wrangler. stay in the loop! join and check out the latest admin post highlights

Oct 18, 2017 8 years ago Official
Bug
User Avatar
Segfault

Yes, I'll try and explain it in a bit (once it's all dealt with). I've just pushed a fix for the search results caching that you'll see in a bit. (15 minutes or so)

Thanks, I'm working on that next. <3

🐝 ☕ bug (he/him) | your friendly neighborhood code wrangler. stay in the loop! join and check out the latest admin post highlights

Oct 18, 2017 8 years ago Official
Bug
User Avatar
Segfault

I just pushed another fix. Things that should be working:

  • When you change the search term, it should show the correct new results
  • When you change the category of an item, it should show correctly when you view the vault home page and the category and stuff
  • When you add/remove items it should show the correct amount when you look again

Ping me with anything other issues you'd like addressed.

[edit]

Quote by Valiska
Yes. I go to the front page of my vault and put items in categories. Then I refresh the page. The items are still there and it says they are in no category,
Then I go to the category and the items are there, but they are ALSO on the front page of the vault.
Also items still appear in the vault for several minutes after I move them to my inventory and quickstock them in my shop.
These issues should now be fixed, can you confirm?

🐝 ☕ bug (he/him) | your friendly neighborhood code wrangler. stay in the loop! join and check out the latest admin post highlights

Oct 18, 2017 8 years ago Official
Bug
User Avatar
Segfault

Thank you, those should now be fixed as well (and by now I mean within 15 minutes - it's gonna take me forever to get used to this new wait time haha)

Let me know around 11:55 if you're still having other problems. (This goes for everyone else too!)

🐝 ☕ bug (he/him) | your friendly neighborhood code wrangler. stay in the loop! join and check out the latest admin post highlights

Oct 18, 2017 8 years ago Official
Bug
User Avatar
Segfault

Quote by Laurey
It all seems to be working now! Thanks for taking care of this &lt;3

Awesome! That's so good to hear.

Okay so now that that's taken care of, let me explain a little bit about how caching works (on Subeta and in general), to clear up why we have it and what was happening here. Under a spoiler for the curious.

SPOILER (click to toggle) As you know, most of our data is stored inside a very large database. When you visit things like the vault, it does a query on the database to retrieve the items list. It is this query that is the slowest part of the vault, because it requires searching a huge database and then loading a huge amount of data into computer memory. So let's say you visit the vault home page twice. This is what happens without any cache involved:

  1. Visit vault home page - It loads items from the database (slow)
  2. Visit vault home page again - It loads items from the database (slow)

When we cache something, it means we keep it around in the computer memory for a while. So instead of the above, this is what it looks like:

  1. Visit vault home page - It loads items from the database (slow) and caches them in memory
  2. Visit vault home page again - It loads items from memory (fast)

Basically, it speeds things up by keeping the items in memory instead of having to load them from the database again and again. If you're looking at a page in your vault, and then you open the same page in another tab for instance, it can just give you the data it already has, instead of computing the same data all over again.

However, if the database changed in the meantime, the cached data will not reflect that change. The solution is to tell the cache to delete that data when you make changes to the database. So what we had to do here is that whenever you made changes to the vault (like adding/removing items) we had to tell the cache to update itself in a "smart" way, so it's not showing you outdated results. That was the main problem here - we were caching things aggressively, but we hadn't set it up to update properly when the database changed. That in itself was kind of complicated, because there were a lot of operations that needed to be considered in the item vault: add/removing items, changing categories, all the different searches you can do... etc.

Though a cache can store data with much faster read/write times, there are still tradeoffs to using it, which is why we still need a database (instead of just using the cache to store everything). For one thing, it relies on computer memory which isn't persistent nor is it a lot of space. The database has a lot more space in it, is persistent, and offers a lot more utilities like complex searching and sorting, whereas a cache is much more limited in both storage capacity and what it can do.

🐝 ☕ bug (he/him) | your friendly neighborhood code wrangler. stay in the loop! join and check out the latest admin post highlights

Oct 19, 2017 8 years ago Official
Bug
User Avatar
Segfault

A new and improved vault is in the works.

🐝 ☕ bug (he/him) | your friendly neighborhood code wrangler. stay in the loop! join and check out the latest admin post highlights

Oct 19, 2017 8 years ago Official
Bug
User Avatar
Segfault

The site has been running fine since we increased caching on the vault, and the increased caching is no longer an inconvenience for users since I fixed the caching logic two days ago. The holiday started off kinda terrible sure, but we've addressed the issues that surfaced. Morostide is still in full swing and we're running smoothly. Vaults are no longer causing major problems.

If you want to suggest that we add an item limit, feel free to make a topic in the Suggestions forums to host further discussion.

Let's try to keep it on-topic here. :)

🐝 ☕ bug (he/him) | your friendly neighborhood code wrangler. stay in the loop! join and check out the latest admin post highlights

Oct 19, 2017 8 years ago Official
Keith
is sweet
User Avatar
Eradication

Quote by METROID

I&;ll just ask the inevitable question: will the vault (and eventually wardrobe) get an item/space limit like shops and galleries now have? As unpopular of a suggestion as it may be, I definitely feel there needs to be more limits in place, especially those two areas. Plus just gives GAs more perks for doubled space. Would also discourage hoarding and force users to either use or sell items sitting in their vault/wardrobe.

I agree that there needs to be more limits in place - and we design features now understanding and thinking about that. I've gone back and forth a lot of times on implementing a hard limit on the number of wardrobe items you can have, and we've discussed it a lot both on staff (and here) about making items unremovable so that people are less likely to toss in huge 10k+ collections of items.

As with vaults, we've always come back on this being really harmful to gameplay - especially with vaults. They're where all of the items on your account end up, and I think it just takes us reworking them on the backend and doing more things like this caching update. There is a lot more that can be done with caching the vaults that I'm going to investigate going forward that will hopefully make it less likely you ever hit a database query after you've loaded them.

We do something similar for the wardrobe, and can always do more to tighten both of those things up.

tldr: Features are created now with limits in mind, we are always looking for ways to speed up the site and ensure a good user experience with things like caching, and have no intention of adding limits to either the wardrobe or the vaults. If one of those were more likely it'd be the wardrobe, but I just don't think it's possible for us to do that at this point in Subeta's life.

💖 ✨ 🤗

Oct 20, 2017 8 years ago Official
Amber
is bitter
User Avatar
Taco

No need to panic! Like he said at the end of his post:

Quote
If one of those were more likely it&;d be the wardrobe, but I just don&;t think it&;s possible for us to do that at this point in Subeta&;s life.

Please log in to reply to this topic.