reor icon indicating copy to clipboard operation
reor copied to clipboard

CPU usage spiking to 100% when typing notes

Open ekianjo opened this issue 1 year ago • 1 comments

I guess Reor uses some kind of real-time system to analyze the notes and transform them into word embeddings. It works well but I noticed that when typing, the CPU usage will jump to 100% (on Linux at least), using all cores at the same time, making the text input freeze sometimes.

Would there be a way to ensure that Reor does not use all CPU resources available by default, so that it does not slow down the reactivity of the system?

ekianjo avatar Feb 21 '24 12:02 ekianjo

Not sure if it is related but on MacOS Reor grinds to a halt with spinning ball when typing in CAPS.

andreofthecape avatar Feb 21 '24 12:02 andreofthecape

Thank you for opening this.

Reor works by periodically writing the contents of the editor to the filesystem and at the same time embedding those contents into the vector database. Perhaps we could think about implementing a customisable indexing period to get rid of this slowness. @ekianjo what cpu/ram/gpu do you have?

@andreofthecape this is strange. Have you tried with the latest release and experience the same thing?

samlhuillier avatar Feb 26 '24 19:02 samlhuillier

@samlhuillier Currently on 0.1.50 and not experiencing the issue anymore. Thanks!

andreofthecape avatar Feb 26 '24 21:02 andreofthecape

@samlhuillier using Reor on a bunch of different machines right now - this is especially noticeable when using Reor within a VM (4 CPUs, 10 GB RAM) but still visible if you run a htop on the previous version 0.1.48 (did not try 0.1.50 yet)

ekianjo avatar Feb 27 '24 15:02 ekianjo

FWIW, I'm experiencing this on 0.1.51 using a Mac.

callado4 avatar Mar 04 '24 16:03 callado4

We have made changes to fix this which will be released later on today.

samlhuillier avatar Mar 04 '24 16:03 samlhuillier

Hey @ekianjo @callado4 this should now be fixed! Download the new version and drop us a message to confirm that there's no longer lag!

samlhuillier avatar Mar 05 '24 15:03 samlhuillier

So far so good for me @samlhuillier, I really appreciate the fix. Now I'm not getting some annoying delays while typing which tends to affect my mental flow.

I would suggest to wait for @ekianjo to give some feedback just because the original issue was for Linux and I wouldn't want it to be closed without confirming that use case (and I'm on a Mac)

callado4 avatar Mar 05 '24 16:03 callado4

@callado4 Amazing! Glad to be of service to your mental flow! Would love to know too if you have any other feedback/new features you'd want added...

samlhuillier avatar Mar 05 '24 16:03 samlhuillier

@samlhuillier let me give it a spin, will let you know how it feels

ekianjo avatar Mar 09 '24 03:03 ekianjo

@samlhuillier looks to be better in the latest version 0.154, so you can close this ticket :-)

ekianjo avatar Mar 17 '24 03:03 ekianjo

Great!

samlhuillier avatar Mar 17 '24 10:03 samlhuillier