Re: Save window position programmatically
Re: Save window position programmatically
- Subject: Re: Save window position programmatically
- From: Michael Gersten <email@hidden>
- Date: Fri, 08 Mar 2002 09:57:47 -0800
>
> "Why is my preferences file 10 MB?!? Ah, because it's saved the window
>
> positions of 1000 documents I'll never open again."
>
>
So you'd rather save that forty bytes of information (describing the
>
window frame) in the resource fork of a file which likely doesn't
>
already have a resource fork? That will require a new 4K (?) disk block
>
to be allocated to each file that needs this information. By saving
>
this into the user defaults, you can put 100 documents' window positions
>
into that same space.
Ahh, yet another reason to use Reiser, or the equivalent.
For those who do not know: the Reiser file system is designed around
the goal of making small objects as efficiently storable as large
objects. That means that a 20 or 30 byte file doesn't take up 4K.
Consider that the windows registry is essentially a new file system
designed for storing tiny bits of data (mostly 1-4 bytes),
incompatible with any other file using program.
Consider that the Mac Os preference system is essentially the same
thing -- a new file system implemented as pieces within a file,
incompatible with any other file using program.
Now, you might not think that making everything look like a file is a
good idea. But it is the unix way.
Michael
p.s. Before anyone says "But I can vi that preference file, it is
compatible" -- you cannot do 'ls ~/Library/Preferences/AppName' to see
the prefs for an app, you cannot say 'echo 1 >
~/Library/Preferences/Finder/SomePropName', etc. Reiser lets you do
this without losing massive storage space.
[Yes, I know, this is pretty much off-topic for cocoa-dev. But I don't
know of cocoa-admin or the equivalent.]
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.