Improve performance - Idea swap Electron for Tauri and SQL Database

Logseq I realize that it has some details to improve in performance and is apparently affected by the performance of Chrome, so an idea would be instead of Electron to use https://tauri.app/ which seems lighter, maybe it helps a little in performance.

Another suggestion would be to use a database like SQLite or MariaDB if the performance detail has to do with the lack of a database.

I’m having a slow even with only 37 files, it takes a few seconds to make Logseq editable and depending on the document it may have some delay, they are small files with few relationships.
When I use Chrome a lot and it gets slow, it seems to affect Logseq as well.

That’s why I thought of the suggestions above for those who know how to improve Logseq’s performance and resources

Logseq uses Datascript for the database and Datalog as the query engine that you can even use directly with Advanced Queries.

About Tauri, it would be nice as an option but it doesn’t come for free: Electron is often choosen because you can be sure your app run always on the same stack. With Tauri the app devs have to stick to whatever the OS provides, for example on Linux it’s WebKitGTK. For example do we know if it supports everything that Logseq needs? You got the idea.

2 Likes

Thank you for the informations.

I understand about the database query and tools, I don’t know if MariaDB or SQLite could have a better performance than the current ones and maybe the change is complex.

About the Tauri it might be a little more complex to port to him, but it would be very good in performance I imagine.

My Logseq is a little slow, I don’t know if it’s some detail of my use, which apparently is quite simple nowadays, I’ll see if I can test better later, I hope that in future versions it will improve performance and support for large amounts of notes .

Logseq chose ClojureScript not only because of all the benefits of the language itself but also because of its awesome ecosystem, such as the DataScript library. More on that later.

DataScript is an in-memory database that implements the Datalog logic programming language. Datalog is very different from and much more expressive than the more common SQL and NoSQL query languages. Many users have implemented interesting features on top of Logseq just by utilizing the rich query language.

from: logseq/CODEBASE_OVERVIEW.md at master · logseq/logseq · GitHub

Using Tauri instead is reasonable but don’t expect better performance while using Logseq; what you would gain is probably faster startup and less RAM used.

For context, I use it on a 2017 2in1 laptop with Intel i5 8th Gen and integrated GPU and it’s fast enough for me…

1 Like

Hello, reading the guide, very interesting to know the architecture used and the reasons for the choices, the Datalog seems very interesting, I will study more about it.

The Tauri I really think would only change the initial RAM consumption, maybe an option for the future if they see more advantage one day than the Electron.

My PC is an I5 6600 with 16G, do you know if Chrome is slow (too many tabs lol) can it affect Logseq, even if you have CPU and RAM left?

Only Logseq or everything in general? Slowing down only Logseq sounds very odd since Logseq ships with its own Chrome engine (like every Electron app), it spawns its own processes… I mean, they are different isolated programs

It seems to me that mainly Logseq, but I have avoided leaving Chrome with too many tabs.

I understand, it really makes sense to have the processes separate, it may be some Chrome detail.

I had stopped using LogSeq, but I’ll come back, because it’s an excellent tool and from what I’ve seen, they are increasingly optimizing performance and resources.

For now I’m going to try to use it only for notes and try to pass my Markdown sites and then convert to MkDocs to generate the HTML.

There is another discussion about LogSeq and Tauri in

From that we can learn about the porting attempt to Tauri in

1 Like

I find that very sexy. Thanks for sharing.