Scripy limits hit already


#1

I have a GUI based project I’m writing in JS. I have hit a script limit already, I got an out of memory error after loading around 670k of images (38 in total) and about 1200 lines of code.

I was going to optimise the images anyway, so was no problem to work around, but would be good to get some further details from the devs on this, specifically:

When loading avatar meshes, we obviously use a lot more memory than 670k! I presume these are stored differently to any images loaded as overlays, so:

What are the actual limits for loading different kinds of data in JS?

Also, in the interests of reducing memory usage and reducing required bandwidth whilst hugely enhancing JS the GUI end user experience:

Are there any plans to support html5 / css / jQuery - i.e provide a some sort of JS browser panel object?

This would provide lots of interesting possibilites and vastly speed up GUI dev times.

Right then. Back to coding…

  • davedub

#2

Is there no “watch” option on this forum so you can keep eye on some threads without posting something ?


#3

? That’s odd, I seem to automatically watch every post I read - perhaps is a profle setting somewhere?


#4

You get e-mail on every post from teh forum ? whoops :open_mouth:


#5

Wow… 670k! We had to live with 64k with LSL in Second Life. Most assuredly optimize the images, but also, in LSL image loads didn’t really count as they weren’t ever loaded into a running script, and we could reference them via the UUID as well. Another work-around would be to do what we did in Second Life and break up the functionality into multiple scripts.


#6

yep, implementing a GUI in SL using textures and within script limits was hard - is very refreshing to be using javascript.

But, would be very cool if we could use HTML5 tech for GUIs though, loading up 40 images that are as small as possible will never be as efficient as a few lines of markup.

I do miss the script memory functions in SL though…


#7

Yeah, I actually was kinda like ugh when I heard JavaScript was the language of the land here, and always got nervous every time talk of switching to JavaScript was brought up in SL. However, after a couple of weeks of digging through examples here, and my previous knowledge of LSL coding (I also coded in BASIC and assembly back the day too), I’m starting to get my bearings coding in JavaScript. I ran the Conway’s Game of Life code on my domain and checked it out, the audio analyzer too, and after seeing how lightening fast they run, I can see why scripting went in the direction it did. When I first got here I couldn’t get a hello world script going, and I’m way beyond that now, but still have a ways to go. The toughest thing has been the lack of documentation for the specific functions created specifically for HF. Right now, the example scripts library is my wiki, and that’s tough sometimes because it often involves alot of digging through code to find the proper syntax. Generally finding the function that does what I’m looking for is pretty easy to find, if it’s trigger by a mouse event, I look at the mouse event, but often times, the function is filled with constants or predefined variables, so I have do dig back, see where those variables or constants were created to determine the variable type being used, an array, or string, or integer, or whatever. Using online resources is tough because 4 sites will do stuff 4 different ways, and is generally html based and has alot of html code mixed in, so outside examples are limited a bit, but I did learn slice() and other string manipulation stuff by looking online. For me, and I suppose just about anyone, code code code is the way to get proficient, and I’ll get there. I’m finishing up a project right now and should have a video later today or tomorrow to show everyone. It was a pretty ambitious project for the level I’m at, but I’m over the hump on figuring out what functions I need, and am nearly done, I just need to finish it and then I also need to go through and look at my logic because I’m using the same code in a two spots, so I need to pull that and create a function to call. Once it’s all cleaned up and ready for prime time I’ll post the video and the code for everyone.