![]() | coupons and why coders hate them![]() |
![]() |
When the database is loaded, it loads all mob, object, extra, exit, room descriptions (basically anytime you see text) into what is known as a 'static' string table. When an object is created, or a mob, what happens is instead of that object having the description on it, all it has is a pointer to this massive table of strings that is in memory.
What does that mean, exactly? Take for example a sidhe tunic. If one were loaded into the game without the static string table, it would take approximately 250 to 600 bytes for its description alone. Not only that, each instance of a sidhe tunic would take that many.
With the static string table, all you need is a small (4-byte) pointer to an entry in the string table, hence using 28 bytes instead of about 400.
Strung items... strung items, all their lavish and unique descriptions are nice... but they are also not on the static string table. Instead of the 28 bytes it takes to make normal objects have descriptions, most strung items take 250-600 bytes of storage... or more in some cases.
Now, that may not sound like a whole lot of memory... not much at all, bytes are small right?
Think again when you have 10,000+ objects on the mud at any given time...
Sure you want everyone to be able to string each item they have?
-Ruf
Its kind of ridiculous when someone has playted a char for years, with alm ost a full strung wardrobe, who wants to alter his rp a bit and doenst feel like looking like an angel when hes fallen from grace, and junking 20 coupons, or losing them, thats more coupons than Ive probably had.
we arent increasing the number of strung items (unless peopple dupe items, which is already illegal) just channging the ones existing.
The way i see it is that if you can get 21 coupons once, you can get them again. Some of us are just not as talented in getting coupons, the only ones i have among my chars were from the st. patrick's day (tho i dt'd that char :() and from x-mas when imms were feeling awfully generous.
Most ppl i see that whine about coupons aren't those that want to rp, but (no offense intended, but) those that just like to strut around stroking their ego.
Dudley
115 bytes a string. the storage for keywords could concievably double it. 230 bytes a string. now, of course the absurd every-character-a-different color strings are -hideously- abusive of ram, but that's another problem. 250-600 sounds -distinctly- high to me, though. And as was pointed out, this is just for player's strings on line, so storage for the full 10,000 objects is hardly necessary.