slap-editor / slap

Sublime-like terminal-based text editor
MIT License
6.14k stars 216 forks source link

Slow on RaspberryPI #106

Open taneltm opened 9 years ago

taneltm commented 9 years ago

RaspberryPI - Model B

Running Slap on RaspberryPI Expected:

Actual result:

Tried:

Unfortunately I was unable to get a CPU profile snapshot file, only screenshots using node-inspector.

CPU Profile1: While typing screen shot 2014-12-29 at 17 37 49

CPU Profile2: While idle screen shot 2014-12-29 at 17 51 48

icebob commented 9 years ago

Same issue on BananaPI

laktak commented 9 years ago

+1, same here (pi).

taneltm commented 9 years ago

Tested this: https://github.com/slap-editor/slap/commit/04b337ccd919b3d06f651b6739ff893aa60d0e27

Ran with parameters: --header.blinkRate 50000 --editor.perf.matchesRenderThrottle 5000 --perf.renderThrottle 250

This is now almost usable in a 80x24 terminal over SSH.

Performance decreases dramatically in terminal larger than 80x24.

taneltm commented 9 years ago

Every time Slap is started, there's a 15-20 second period when the performance is very poor on the RaspberryPi, this should be fixed with: https://github.com/slap-editor/slap/issues/98

It would also help if auto-update was configurable.

dbkaplun commented 9 years ago

I have been working on a performance-improved branch, which seems to work very well. Feel free to try it out and let me know if you find any issues:

npm install -g secrettriangle/slap#text-buffer
icebob commented 9 years ago

Thank you. When I install I get an error: image

dbkaplun commented 9 years ago

@icebob hmm, try it again. The branch is under heavy development so it's likely an installation issue 5 minutes ago is fixed now. If that doesn't work, join #slap on Freenode and we'll figure it out.

dbkaplun commented 9 years ago

OK, if you're getting A valid Gruntfile could not be found, it's a problem with certain versions of npm. Run npm install -g npm@1.4.28 and try again.

dbkaplun commented 9 years ago

The text-buffer branch has now been released. There are still further optimizations, documented in #118, so I will keep this ticket open.

dbkaplun commented 9 years ago

I've just released some changes which should improve performance dramatically. Try it out and let me know if it's any better!

dbkaplun commented 9 years ago

Also, @icebob, the dependency on npm@1.4.28 has been lifted.

dbkaplun commented 9 years ago

0.1.21 should be way faster. Please confirm!

taneltm commented 9 years ago

I was hoping for "way faster", but it looks to be the same or maybe a tiny bit better..

Then again it is very hard to measure the exact difference by just trying. It could be now 25% faster and I wouldn't be able to tell the difference. For example, if a keystroke took 400ms to render before and 300ms now, it's quite a big difference, but to a user it may seem pretty much the same.

dbkaplun commented 9 years ago

See also chjj/blessed#178.

dbkaplun commented 8 years ago

I've been porting slap to react-blessed for the past few days. I've just finished porting the editor-widget portion of it completely. Already the difference in performance is dramatic, even on my nimble Macbook Air. If you're really adventurous you might be able to try it out. Stay tuned.