fand / veda

⚡VJ / Live Coding on Atom⚡
http://veda.gl/
MIT License
509 stars 34 forks source link

Blank lines slow down compilation dramatically #57

Closed demicuz closed 6 years ago

demicuz commented 6 years ago

Fragment shader gist with this issue being present. On my laptop it takes >20 sec to compile. And this is exactly the same shader, comments removed, which compiles instantly.

Also, it seems like you can't have /*...*/ comments anywhere in your code, as it ruins commands such as /*{server:3000}*/.

demicuz commented 6 years ago

Interestingly, replacing commented code with dummy text helped a bit. Now compilation time is about 10 sec.

Chovin commented 6 years ago

time to make an esoteric comment language so you can comment in VEDA :+1:

fand commented 6 years ago

@demicuz Thx for reporting!

The shader compiles in about .5 sec in my environment... (MBP 2013) What's your environment?

The 2nd bug is fixed in v2.4.2. Plz try this 🙏

demicuz commented 6 years ago

I've experimented a bit with the code, and it seems that the issue is caused by blank lines in a shader. On my laptop I start noticing it after 21 blank lines (takes about 2 sec), but 18 is totally OK. With 26 it runs in about 35 sec. Their location doesn't matter, it's the overall number of them that slows things down. Try running this shader with 30 blank lines.

demicuz commented 6 years ago

I've updated VEDA to 2.4.2 and the issue is gone. It seems like 8d19883 fixed all this weird behaviour.

fand commented 6 years ago

Great! sorry for inconvenience 👻