ShaderEditor icon indicating copy to clipboard operation
ShaderEditor copied to clipboard

editor gets slower

Open nxrix opened this issue 3 years ago • 7 comments

Always editor gets slower when editing big file also when the preview is so fast and highlights are disabled.

IMG_20221206_224613

nxrix avatar Dec 06 '22 19:12 nxrix

Well, resources are not endless 😉

If the shader runs much slower than ~50 fps, it is better to run it in its own window instead of in the background. You can change this by picking a different Run Mode in settings.

The editor is essentially Android's EditText control, extended with some regular expressions for syntax highlighting. Unfortunately, this control does not handle large amounts of text very well 😬 The only option to improve it a little bit is to disable syntax highlighting for large amounts of text at the moment. Sorry.

markusfisch avatar Dec 06 '22 19:12 markusfisch

i tried all of those things you said but still its slow 😕

nxrix avatar Jan 05 '23 16:01 nxrix

The only option to improve it a little bit is to disable syntax highlighting for large amounts of text at the moment. Sorry.

What about adaptively adjusting the highlight/shader update delays as things get slower?

Asmageddon avatar Apr 17 '23 07:04 Asmageddon

Is the editing of text slow, the scroll slow, or the lag due to compilation?

AntonPieper avatar Sep 26 '23 09:09 AntonPieper

I'd really love to be able to load files into the editor, this way i could edit with a faster editor and import to this app to try the shader out

RpxdYTX avatar Apr 16 '24 20:04 RpxdYTX

@RpxdYTX is that a performance regression since last year, or has the slowness always been an issue for you? Because I have implemented lexer-based highlighting for version 2.32.0, which should improve performance of code highlighting. Of course, this should only improve text drawing performance, not shader compilation and overall shader performance. I am just wondering if I somehow made the editor slower for some.

AntonPieper avatar Apr 17 '24 05:04 AntonPieper

It has always been an issue, sometimes i need to stop writing code, wait for it to appear on screen and then do something like Shift + Letter to write things like gl_FragColor.

RpxdYTX avatar Apr 17 '24 13:04 RpxdYTX