Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make replacement of LSL Constants optional #14

Open
RayZopf opened this issue Feb 26, 2016 · 0 comments
Open

make replacement of LSL Constants optional #14

RayZopf opened this issue Feb 26, 2016 · 0 comments
Labels

Comments

@RayZopf
Copy link

RayZopf commented Feb 26, 2016

https://code.google.com/archive/p/lslforge/issues/42
Posted on Mar 31, 2014 by Happy Wombat
I compared LSL scripts memory usage of

lsl code which LSLForge optimized/with replaced constants (TRUE, FALSE, etc.) to the same script with manually 'unreplaced' constants and did not find differences - at least not after the very first script init was done.

To me it looks like MONO handles those constants quite good http://wiki.secondlife.com/wiki/LSL_Constants_vs_Globals

In this case, not replacing constants at least improves script readability and should give no issue unless the line gets too long - so make it optional... maybe call it obfuscation ;)

Comment 1

Posted on Mar 31, 2014 by Happy Wombat
one point where the constant replacement indeed is useful:

llRequestPermissions(g_kOwner, PERMISSION_CONTROL_CAMERA | PERMISSION_TRACK_CAMERA); is replaced by llRequestPermissions(g_kOwner,3072);

here some profiling would be needed to see if this improves any momory usage but esp. server time usage

Would be great to have a replacement/optimization for this case too: if (_perm0 & 2048 && _perm0 & 1024) { (was: if ((perm & PERMISSION_CONTROL_CAMERA) && (perm & PERMISSION_TRACK_CAMERA)) {)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants