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

freezing when trying to write a record of ~ 3000 characters #533

Open
pliablepixels opened this issue Aug 12, 2016 · 3 comments
Open

freezing when trying to write a record of ~ 3000 characters #533

pliablepixels opened this issue Aug 12, 2016 · 3 comments

Comments

@pliablepixels
Copy link

pliablepixels commented Aug 12, 2016

Hi there, I am using localforage with cordova-sqlite-storage. On certain Android devices (not all), the UI completely freezes (and does not recover) when I try and store a large record.

version:

cordova-sqlite-storage 1.4.6-pre6a "Cordova sqlite storage plugin"

Here is how I init it:

 order = [window.cordovaSQLiteDriver._driver,
              localforage.INDEXEDDB,
              localforage.WEBSQL,
             localforage.LOCALSTORAGE];

localforage.defineDriver(window.cordovaSQLiteDriver)
.then(function () {
            return localforage.setDriver(order );
             }).then(function () {
                // this should alert "cordovaSQLiteDriver" when in an emulator or a device
                ZMDataModel.zmLog("localforage driver for storage:" + localforage.driver());
               });

The record that freezes is this:

localforage.setItem("serverList", longstring);

where longstring = this value (for example). [3033 characters]

U2FsdGVkX19CF6oNoCNvT2u98FmauS6F+usWkFU2xuTrakB/U4VIBSA8b51k38lz307H0fO+0v2nPjNZvIR/nlAChp9ArErLTL1AvV9mjK01A74X/Ud8Oan3L6avxNMQ3DQuSc7UPWZUpC78CA9bnNazNGl/elWtrR5mVVlRMd1y5pCxyqT+VwBBAP+j9KrMymCCn4jkAKfxDipM6GCDDP78qXLC5mh7aWQmO4aBu8uWBdnmCMTr5U0RHTDc6CsMQp5bnhfNFC9tj7pUEIpwnW8SDHHG/KQX5W/NsuFl8HmyrCFcBn03TnfX8xCAwH30Q+tFRClw7vhOXUfDZOicFx4p+HvPt0y2WB06EQOhl0o9yjbezAIH2W91RltkS9awz7kMUdA21b578o1f7cJdH1nfhA+ubd9DptaK0M2HAnESkS+HzP6XWdtjFqmTEFKQyk00la63L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SniFo1Tvz16uiWIAIlCrw0rPOlCZZAxbLkf0BPFDnGTTOiXzWEtcc1ml5R++4ot9FKnvvDATclR7u+eVryC+pbA3rpfAk1venBGv/e2xAUIk26Ap1ri1iFk/nA6H2m/VDuNtMRie/OANqbtTKm9A3oZvZPt4f7FbpIywFXVyWjyeblam/MsXGF0aMLQ8LHrxTo/GbGeTDWSvDQ12OuI+qOZJwKNfQh72sJR3VLOlMTE3drNytmmk03FJjooCzia2MzEQDGJxi/IuOzs3u/1L/hpu8ui+pQs9MPRFmi1tL4rUGsiGSN8wlwCvZV9vqshvCuaKZAEusKhVZ/iFTv8ER94EUkFS9e/FbirQ8AhfRAE4lrpDjOtmVqReA95zkywQ0lAPGw9iDF39OmIGsMqF==

Note that if I change the order to WEBSQL/INDEXEDDB above sqlite, then things work fine, which is why I believe the problem is with the sqlite plugin.

thank you for your time

@brodycj
Copy link

brodycj commented Aug 12, 2016

I will add tests for record sizes of 3000 or greater when I get a chance. Unfortunately I cannot be so confident that I will be able reproduce an issue that only shows up on certain Android devices. It may take a few weeks due to my current backlog.

@pliablepixels
Copy link
Author

Thank you.

@brodycj
Copy link

brodycj commented May 8, 2018

Marking as an enhancement, highly desired for a possible redesign discussed in #548.

Similar question was also asked in #474 & #766.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants