On Fri, 20 Feb 1998, George wrote:
->As has already been pointed out, it makes the system think it's not using
->as much RAM. Why not extend the idea and compress your room descriptions?
->Or implement your own disk swapper? You could get really fancy and write
->your own memory management subsystem. Why stop there? A MUD kernel!
Why stop there? Well, my answer, to be perfectly blunt is: because
it's a waste of time to even get there. After completing this part of
the message, I copied it to a text file and checked its size; then
compressed it with gzip (-9) and checked its size again. The results
are:
Before compression: 267 bytes
After compression : 203 bytes
Savings : 64 bytes
Now, admittedly, some room descriptions are longer than the four line
one above; but others are smaller. So, I think it's a good average
length for room descriptions. Now, let's say we have 6000 rooms on
our MUD (I don't know what most people have; I suspect more,
but...<shrug>), we get,
Without compression: 1.6mb
With compression : 1.2mb
Estimated savings : 400k
We save a whole 400k in in-memory room descriptions according to the
above; which isn't a lot considering that we don't factor in the space
we loose by adding in the lines of code to do in-memory compression
comparable to what "gzip -9" does. You could probably squeeze a lot
more memory out of the MUD by removing all of those weapons your
immortals created for themselves...:P~
-dak
+------------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
| http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
+------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/15/00 PST