Jump to content

Love Zhaoying

Resident
  • Posts

    39,007
  • Joined

  • Last visited

  • Days Won

    190

Everything posted by Love Zhaoying

  1. Thanks, I also noticed it does not ALWAYS take minimum 512 bytes to add a function, just ALMOST always.
  2. Continuing work on an epic script, I've been "refactoring" some code lately and checking the results of memory usage before and after. Here, by "refactoring" I mean this: I find a few lines of code that I am using repeatedly, and turn that code into a function. To my surprise, it can use MORE script memory to do this. (I am using llGetUsedMemory() to check memory usages, as for this scenario I mostly care about "code" memory usage, not stack/heap usage.) For a simple example: If I find several places in my code that I am getting the first character from a string as a "Prefix" using llGetSubString(varname, 0,0) - then I make a function called "GetPrefix" that just returns the first character of the string. I know this is not a very good example, as it only represents a single line of code. What I found is this: If I create a function, it always uses an additional 512 bytes minimum of script memory! Depending on the number of lines in the function, it actually SAVES memory to NOT use a function and to repeat the same code in-line instead. On the other hand, depending on the number of lines of code, and how many places it is called, the 512 bytes always used by the function is made up for by having the function call. If the function has say, 10 lines of code then it would "wash" and the savings is about the same either say (again, depending on the code and number of times it is repeated). So far, doing this I have managed to save 2K total of memory in one script just by NOT writing user functions in some cases. That's not a lot, but when memory is tight it FEELS like a lot! The next part of this experiment is that I will combine two "medium-sized" functions which perform similar operations into 1 "larger" function which switches to decide exactly what operations to perform - and see if I still save that 512 bytes (from the extra function call) plus the savings from not repeating code in the two similar functions. My ultimate goal is to save about 16k by these "tweaks". It is all very counter-intuitive. Has anyone else noticed this? (Disclaimer, of course I only use Mono settings. Also, I am a professional programmer.)
  3. I suppose one theory is: LL will not need to try and "fix" or improve their welcome areas, community gateway content creators will make better ones using better content. One question I had is: will community gateways get some kind of discount on tier fees, since they are ostensibly "signing up" new users?
  4. I'm a bit cynical at Linden's "letting" others promote SL via their own gateways. However, if it works, it works! And, motivated individuals with good intentions will probably do good things.
  5. What do you all think about the "Community Gateway Program" announcement?
  6. I am sure the creators of "Rapelay" are devastated that SL came in as #1. The SL users in the video sure know how to party!
  7. Remembering the "Beverly Hillbillies" episode where the Clampett's thought that "topless" mean that men don't wear hats.
  8. Those naughty, randy Dragonriders!
  9. What does a sled-driver with a hairlip say? "Mesh! Mesh!"
  10. I thought of an interesting and cheesy feature: Add a "like" button directly to the "Activity streams" views for "unread posts". But then you'd not have to actually go to the thread to like a post. Just an idea..
  11. Thanks for posting this, I just did it in case I ever want to go to Aditi and test upload anything!
  12. This sounds like a big accomplishment, I hope many adopt your changes and give you feedback. While I am not a mesh creator, I follow the posts to learn and it seems like you have created a way to skip a few steps. Congratulations!
  13. The other thing I have done is take the mat back into inventory, wait for a while, then res it again on the floor. That appeared to work in some cases. I need to try that with my script issue also and see if that helps. This is a script I am constantly working on, in a HUD.
  14. Maybe "24 hours of Happy" is a cure. http://24hoursofhappy.com
  15. I have seen problems lately where my script runs out of memory for some strange reason - but if I copy the code to a brand new script, it has lots of memory. For me, what I am seeing is that somehow scripts are not truly freeing all of the memory after restart or recompile, and it gets worse as time goes on. I have reproduced this twice lately. Failing that, make sure all the scripts are checked MONO not "LSO"!
  16. That's where I heard that expression!
  17. Is there an expression involving a bag of hammers? Not a "dumber than", I think. That's a box of rocks.
  18. There is a fine line between "no value" and "priceless"!
  19. I was thinking that in the context of a giveaway, asking whether someone prefers the male or female freebie is ok.
  20. Ask the avatar, with a dialog box.
  21. The marketplace ad says that if you already bought it you will be refunded minus the 5% Linden commission. Now, if that were TRUE (and you have faith that it's true) I would say, just buy another one and you will only end up paying the 5% commission after the "automatic refund". Not sure how that works.
×
×
  • Create New...