Comments (3)
If you are talking about the insert / update / error event, the cost of listening to these events are pretty low so it's safe to do that, but if your data updating logic on the Svelte side is heavy, remember throttle the update callback.
The main bottleneck is probably the adapter, if you are selecting an incorrect adapter for a looooooooooot of data, the performance of serialization would be pretty low.
Most of the adapter are built for Node.js so I assume you:
- Do not need to persistence the data into the hard disk.
- Implemented your own persistence adapter with Rust since you are using Tauri.
- Sync your data with the Changes API.
A detailed description would help a lot to let me know what you are expecting from this library.
from lokijs.
If you are talking about the insert / update / error event, the cost of listening to these events are pretty low so it's safe to do that, but if your data updating logic on the Svelte side is heavy, remember throttle the update callback.
The main bottleneck is probably the adapter, if you are selecting an incorrect adapter for a looooooooooot of data, the performance of serialization would be pretty low.
I understand, thanks!
Most of the adapter are built for Node.js so I assume you:
- Do not need to persistence the data into the hard disk.
- Implemented your own persistence adapter with Rust since you are using Tauri.
- Sync your data with the Changes API.
I'm currently moving away from Tauri due to an unrelated issue (I've been using sqlite with the old setup). Now I'm switching over to Electron, so Node it is and LokiJS came into play :) I do need to persist data into the hard disc though!
A detailed description would help a lot to let me know what you are expecting from this library.
I need to store documents in 4 collections. I expect them to hold no more than 5000 documents combined (probably much less on average - maybe around 1000). The documents hold objects with 5-30 properties (1 level of nesting max).
Within the app there's a list of all items for every collection (separate routes). I need to experiment with performance, but I'll probably put a limit on the query. I need to be able to filter each list with a search term that will be compared against a couple of properties.
As of now when I run an operation like insert/update/remove, I don't re-run the query but update the list from the frontend accordingly. Of course this was less convenient to write, but since I now have the option to use an observable, I wonder if I should get rid of all of this code :)
from lokijs.
I think your use case is safe, good luck.
BTW, avoid using loki-fs-structured-adapter
, it is buggy.
from lokijs.
Related Issues (20)
- Incorrect implementation of `getObjectDelta`
- Incorrect implementation of `ResultSet.update`
- TTL options of Collections do not persist (re-open #626)
- Is this project dead? HOT 17
- Incorrect implementation of unit test of `immutable`
- Incorrect implementation of `inflate`
- `simpleSort` with `useJavascriptSorting` don't support `dotNotation`
- Unit test of `persistence` is not correctly implemented
- `compoundEval` is not correctly implemented
- The unit test of `sotringIndexing` is not correctly implemented
- The unit test of `test` is not correctly implemented
- Error: this collection cannot be loaded lazily HOT 2
- Use https in description
- [Question] Reload database / cancel changes HOT 2
- Feature Request: IPFS Adapter HOT 1
- clone is required to use pre-update HOT 1
- 'Leave a tip" link is broken
- Failed to add collection:', [Error: ensureNotFalsy() is falsy] HOT 1
- Wrong results when using $in and $nin together
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 lokijs.