-
Hello, I am wondering if there is anything in this plugin that would cause my phone to timeout before retrieving a document where my pc doesn't have an issue. I am using a slightly older version of this plugin. If the document is smaller it works on my android, but when it gets bigger, it seems to timeout, and the cache needs to be cleared before I can connect to the database again. It also only seems to be for a large document that has about 10 fields. a similar size document with only 1 field has no trouble. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 8 comments 3 replies
-
Also, I think my version doesn't even use offline features so caching isn't helpful. How difficult would it be to tear that stuff out? Caching seems to just cause problems, and I may do it manually. |
Beta Was this translation helpful? Give feedback.
-
What version are you using? Caching should be disabled by default in more recent versions. If you're on 3.x, I guess I didn't do it there though. 4.x, it's definitely disabled. It's easy enough to turn it off without removing it, but in 4.x, I believe I have removed it entirely. |
Beta Was this translation helpful? Give feedback.
-
As for large documents, 10 fields is not that many. How are you using it? Like what's your code? |
Beta Was this translation helpful? Give feedback.
-
Sorry for the multiple posts, but also, I'll be looking into implementing the change that I made on the 4.x side for Firestore recently which will immediately remove the caching automatically as well. I haven't had time for it, and also only seem to be losing motivation instead of gaining it :P, but it's still something which definitely needs to happen. How urgent is your need for that version of the library, if you're on 3.x as I suspect? |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Okay, caching in Firestore has officially been removed! Are you able to download the current version and test it, or do you need me to make a release, and/or update it in the asset library? |
Beta Was this translation helpful? Give feedback.
-
Alright! The biggest update for 3.x has been pushed. I hope it works for you! This update includes making Firestore be more like 4.x, which is huge. It'll make maintaining the 3.x branch going forward a lot easier. I have NOT updated the wiki yet, I need some time to do that. Feel free to get latest on the main branch and let me know if you like it, and/or if you run into any bugs! That said, it ran through the Test Harness perfectly and worked for every test. The one thing I didn't add from 4.x is the listening endpoint and committing changes. I didn't want that included in the same set of commits. I'm still deciding if I want to add them at all. Committing changes would give you the ability to have server-side timestamps and a few other very small things, let me know if that's interesting to you or no. I'm going to go ahead and close this now, as the issue is resolved quite well! (By the way, the thing will be cached, but in a node in your scene tree, meaning you can just pass true/false to get_doc - the newly named get function - as the second parameter and if you pass true, it won't even bother to send a request. Useful if you know your app doesn't need an updated copy of the document, and if you don't want to have to save the document in a singleton across scenes. Plus, if you pass true and the document isn't cached in the tree, it'll actually just make a request to go get it. I didn't make true the default though to maintain backward compatibility. In any case, you can let me know if these are useful at patreon.com/KyleSzklenski - probably easier than here, and I support free memberships! |
Beta Was this translation helpful? Give feedback.
-
Well make sure to save your current version just in case! 🤣 |
Beta Was this translation helpful? Give feedback.
Ok so it was the timeout in the firestore.gd. I increased it to 15 seconds, which seems excessive but ah well it works now and it is just watching leaderboard replays. Not sure why it takes longer on mobile than on pc. I'd still like to disable caching if you could point me in the right direction to do that. Thanks for you help as always!!