Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Checking assumption re: comments

Nika Talaj
now you see her ...
Join date: 2 Jan 2007
Posts: 5,449
01-30-2010 11:17
I have a stupid question, but knowing LSL I just thought I'd check:

I tend to document script operation in comments in a standard script header I use.

I've always assumed that the cost of comments in LSL was negligible, as in any preprocessed scripting language. That is, I assume that the only part of a script consuming sim script memory is the bytecode and real data. Presumably the size of the actual script text shows up as a tiny cost in my own inventory and any object inventory that contains it, but the volume of comments has NO impact on sim script resources, and thus do not matter so far as any impending script limits are concerned.

It's only rational. Then again, LSL was thrown together. Has anyone measured this?

Yah, it's a really stupid question. But sometimes, in SL, when I ask stupid questions I get surprising answers.

:o
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
01-30-2010 11:46
I can say that your comments don't add anything to the compiled size of the script, which is actually separate from the readable portion.... the readable portion I'd assume is stored locally in your inventory, and globally in the asset server (which explains why they are continually slow to load from objects... they aren't there yet, just the compiled code)
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
DoteDote Edison
Thinks Too Much
Join date: 6 Jun 2004
Posts: 790
01-30-2010 17:53
I can't imagine LL would allow us to compile a simple "Hello World!" script using source code padded to something extreme, like 1MB of comments. My understanding is that the source code does have a memory limit, same as for notecards. If that's still the case, comments could affect the ability to save/compile an otherwise compilable script.
Nika Talaj
now you see her ...
Join date: 2 Jan 2007
Posts: 5,449
01-30-2010 19:06
I *wish* I were clever enough to implement something in 16K of code that would need 1MB of text to explain, but alas! the most I ever see myself needing is ~4K.

Void: whew! Thanks!
:)