Anki's Svelte future

Examples of badly designed software build with js? I don’t use many, but one example is Element, which I find particularly frustrating because it’s slow and bloated. I still use it because of its developer tools (the menus that you see when you type /devtools). They let you do various stuff like sending custom events and exploring room state.

1 Like

This is something I worry the most. At Ajatt-Tools, we have invested enormous time and effort into creating some very large add-ons. Of course all of them use PyQt(6) and Python. While these add-ons are still functional because they’re still maintained, we have faced issues in the past when Anki underwent changes, requiring us to update our code.

Thankfully, for the last year or so we haven’t faced any major problems. Big thanks to dae for minimizing add-on breakage. Although I don’t know about other add-ons, it could be that they still broke recently because they have been affected by something our add-ons have not.

If pyqt is removed from Anki, I likely won’t rewrite our add-ons in whatever thing is proposed instead. It’s just too much work to port that much code. And I won’t be having good time spending thousands of hours rewriting something in an inferior language.

I prefer changes to be positive haha. I think it’s essential to strive for improvements. Life often brings too many bad events. Adding even more artificially is really saddening.


For me the slowest parts are startup, opening deck options, and moving between svelte screens. These actions run with a noticeable delay and sometimes flash. The lag is not big (just about one second) but it’s enough to disturb me because other menus work instantly (this is true for Qt dialogs in Anki). Basically everything that is made with svelte feels bad and everything that still uses Qt is great.

A while back I made a PR that improved the deck options window (using pyqt), but it was rejected.

I’m interested in a fork that would replace all Svelte parts with native widgets (e.g. Qt widgets). Hopefully someone makes it in the future.

Some operating systems (with Linux added) run Anki fine. For example the GNU operating system. But the performance is probably not different.

At the very least I don’t want it to cause us inconvenience. Changes to the user interface can affect add-ons, including ours, so it’s essential to minimize any potential disruptions. If necessary, I suggest moving to Qt Quick if Qt Widgets are insufficient. Additionally, rewriting the Rust parts in C++23 would be awesome.

JS is an inferior technology that often results in applications that:

  • consume excessive disk space
  • require unreasonable amounts of RAM
  • are slower than reasonable

As a result, everything built with JavaScript, including Svelte, tends to be barely usable. To mitigate the negative impact of JavaScript, I also try to disable it in my browser whenever possible. In contrast, native widgets on desktop platforms like GTK and Qt offer a more robust and efficient alternative.

Python isn’t perfect either. When developing personal projects, I prefer using C++. At Ajatt-Tools, we use Python for add-on development because that’s the only option. But I wouldn’t switch to JS if I could choose.

I run the latest version usually. I install it from the archlinuxcn repo. When I try to install an old version from pypi, it fails due to some cryptic errors, so I can’t test it. There used to be a package called anki-official-binary-bundle but it disappeared around december 2023. The PKGBUILD file can still be retrieved so I might be able to pull it and install the package. I’ll update my post if something comes out of it.


My purpose is different from tatsumoto’s, but I am very interested in developing UIs in PyQt, and I am wondering if it could be implemented in add-ons (not Fork).

The reason for this is that I am developing GUI and animations for gamification learning add-ons almost only using PyQt.

For example, it might be interesting if a custom editor could pop up when the user open the editor (like a game screen).
If I develop this, I need to replicate Anki action in PyQt as much as possible, so I should be able to develop a UI made of PyQt instead of Svelte parts.

1 Like

I think it’s possible to override what buttons do so you can basically use qconnect() to call your editor dialog when the user presses “edit”.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.