Beamer is very laggy

I am using texmacs for the first time to create a beamer document. After just 20 slides, texmacs has become unbearably laggy while typing.

Here’s a video recording (at 60fps) that demonstrates what I’m talking about:

I am on arch linux and using texmacs version 2.1.2.

Sometime ago I noticed too some slowness. Maybe a bug report?

You mean you noticed a slowness in a recent version?

I just tried an older version from an appimage. The issue is in the latest version.

I had noticed slowness in one of the older versions as well, but I do not recall which. In this version I haven’t yet written long presentations.

@hamorabi What build are you using to test the latest version (where you see the slowdown)? Is it also the AppImage?

I got the arch linux build from this site. The build I’m using is labelled texmacs-2.1.2.svn13883+extras-0-x86_64.pkg.tar.zst.

It could be useful to compare like for like (AppImage for both). Performance can depend on the versions of Qt used or build options.

I just tried the latest appimage posted here. Typing lags just as bad as the version I posted earlier. This issue doesn’t exist in the previous version (which I have access to through an appimage).

I don’t see any immediate suspect among recent commits. It should be possible to pinpoint the culprit with a git bisect.
It’s would be good to record this in a bug report so we don’t loose track of it.

I tried, but I can’t reproduce this. Typing stays fluent with over 40 slides. Do you have a way to reproduce the problem from a new Beamer file, or does it occur with a specific file? If the latter, it would be useful if you could share an example.

1 Like

As I mentioned previously, this happens only when using the latest version from the link I provided. It doesn’t happen in older versions.

Thanks, I understand that. I have tried both in the latest SVN and the AppImage for 2.1.2, I can’t reproduce it.

1 Like

Here’s the file I am working on.

Also, note that I’m on arch linux.

1 Like

Many thanks for sharing. I still get a decent speed. You could check what timings you get by enabling Tools->Debugging tools, then Debug->bench. If you run TeXmacs from the terminal this way, it then prints the time it takes to typeset after every keystroke. I get either 0 ms or 1 ms.

I am on Fedora, but I believe the AppImages should have all dependent libraries built in, so the distro shouldn’t make much of a difference.

I also get 1 ms and 0 ms. In my case, about 90% of the time, it’s 1 ms. I also observe the occasional 2 ms.

I hope you don’t mind me asking you an unrelated question. Is it possible to automatically run all pygment blocks? I have made some changes to the syntax file and I don’t want to rerun each pygment block manually.

Not that I know of, but it should be possible with a few lines of Scheme. The Scheme command for switching between folded and unfolded trees is (alternate-toggle t) where t is a tree (to test it, go to Debug->Execute->Execute scheme expression and enter (alternate-toggle (cursor-tree)) while the cursor is inside a fold). Combined with a filter to find all executable folds, it should be possible to do what you want.

Hello, I tried installing the dev packages under linux under WSL and I do not see any particular issue. My response time is around 0-2ms in the bench. It seems a bit snappier than what you recorded (btw, the gif is probably low framerate itself so it is difficult to appreciate the slowdown)

While typing the CPU does tend to baloon a lot but it slows down as soon as you stop. I get around 30%-40% utilization while holding down a key (however, this is not really telling since it is running under WSL).

Let me know if I can help in any other way

1 Like

I am using linux, not WSL. Also, the video you see is not a gif and I made sure I recorded at 60fps. As I also mentioned, the issue doesn’t exist in older versions.