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

Evaluate better storage than in-memory map #13

Open
danvratil opened this issue Mar 26, 2019 · 1 comment
Open

Evaluate better storage than in-memory map #13

danvratil opened this issue Mar 26, 2019 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@danvratil
Copy link
Owner

With many channels and active team, the in-memory cache will grow very quickly. An alternative storage, like SQLite could be used in this case, or the cache must be made smarter about what it really caches.

@danvratil danvratil added the enhancement New feature or request label Mar 26, 2019
@danvratil
Copy link
Owner Author

SQLite doesn't make sense for fast querying and live display.

Instead, a tree-like structure, maybe built on top of QAIM, could make this much simpler. The model can dynamically fetch missing contents. The model can internally expire old contents. It would also make it simpler to represent the contents in QML.

Rather than simple QVariantMap, we can have a proper node tree. Channels and messages can be represented as Q_GADGETs, which are fairly cheap thanks to static metaobject. The question is whether Qt in SFOS is new enough to have proper gadget support in QML :-)

After the failed attempt with reactions, this is now a pre-requisite for any further work.

The important part is fast enough lookup for messages. The message ID is a timestamp and are sorted by the timestamp, so we should be able to have a fast lookup with binary search. We just need a representation other than QString, that doesn't compare well :-)

@danvratil danvratil self-assigned this Feb 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant