Comments (6)
I see same duplicate log records.
from ionic-storage.
Dito, and, although not yet confirmed with empirical tests, I'd also agree on the sentiment that ionic-storage pulls heavy on startup time. When I used native localstorage before, it seemed way faster. But since localstorage is not an option for certain platforms/deployments it would be great to see ionic-storage perform at a similar level (ionickv/indexdb).
from ionic-storage.
There is some other oddity I've discovered when setting a different db/store name (other than the default _ionickv), which may have the same origin:
export function provideStorage(): any {
return new Storage(
[
'sqlite',
'indexeddb',
'websql',
'localstorage',
],
{
name: 'governessdb',
storeName: 'governessdata',
}
);
}
[...]
export function providers(): any {
return [
[...]
// Enable Ionic's storage engine
{ provide: Storage, useFactory: provideStorage },
];
}
@NgModule({
[...]
providers: providers(),
})
It still creates the _ionickv indexeddb and now half of the data is in _ionickv, while other stuff, which was triggered to write later (after init) within the applications workflow is in governessdata.
Code: https://github.com/apollo-ng/governess/tree/master/client
from ionic-storage.
Hmm, not able to reproduce
from ionic-storage.
@mlynch: Thanks for the reminder. Since you couldn't reproduce I went ahead and tried to figure it out. I haven't done a second round to re-verify but in my case it seemed to have been caused by wrapping ionic-storage into a storage provider/service and then using this in the actual data provider services.
Before there was ionic-storage I created my own storage provider to wrap native localstorage and after ionic-storage was released I just swapped my localstorage calls with ionic-storage ones.
After importing and using ionic-storage in each data provider/service instead of my own storage provider it creates only the governessdata storage instance. I have no idea why it should make a difference but it seems to do.
from ionic-storage.
Closing!
from ionic-storage.
Related Issues (20)
- Need help configuring the storage manager
- (question) rationale behind IndexedDB being the 1st driver in driversOrder ?
- The NgModule 'IonicStorageModule' needs to be compiled using the JIT compiler, but '@angular/compiler' is not available.
- IOS app doesn't retain state after ionic/storage version(3.0.6) upgrade for ionic app HOT 1
- Not working when re opening the app in OFFLINE mode HOT 1
- Angular 15 updates in source code not available in npm HOT 5
- Angular 16 support HOT 22
- iOS 16.1 SDK update clears ionic storage HOT 2
- Unable to use SQLite for native storage (Android) but only IndexDB and localstorage works ,Error: No available storage method found HOT 2
- Error: No available storage method found when using CordovaSQLiteDriver with Ionic Storage HOT 1
- SQLite Installation HOT 1
- localForage-CordovaSQLiteDriver maintenance
- Storage access blocks the main ui HOT 2
- ERROR Error: Uncaught (in promise): NullInjectorError: R3InjectorError(AppModule)[AuthGuard -> StorageService -> Storage -> Storage]: NullInjectorError: No provider for Storage! HOT 2
- Method get is not working HOT 3
- Angular 16 upgrading HOT 3
- Random data losses on iOS HOT 4
- Update README for Angular users HOT 1
- Cannot find Driver enum. HOT 1
- switched args in storage.forEach documentation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ionic-storage.