|
|
Safari tweaking
|
|
|
|
Mac Elite
Join Date: Aug 2001
Status:
Offline
|
|
After reading David Hyatt's most recent post about the initial paint delay setting in Safari, I decided that since I couldn't get the latest build of Safari, I might as well look for a hidden pref to tweak the value to something more appropriate for my cable connection. So far I haven't found such a pref (I did defaults read com.apple.Safari). Any ideas on other places to look (I'm posting on this forum rather than the software one since I figure people will be more accustomed to working with the defaults database here)?
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Oct 1999
Location: San Jose, Ca
Status:
Offline
|
|
I would suspect that there is no defaults for this, and all of the values are hard-coded. This is a place where you do not want to be checking the disk for values all the time (kills performance), and so a place where compiling in a value makes a lot of sense.
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Aug 2001
Status:
Offline
|
|
Originally posted by larkost:
I would suspect that there is no defaults for this, and all of the values are hard-coded. This is a place where you do not want to be checking the disk for values all the time (kills performance), and so a place where compiling in a value makes a lot of sense.
Well, I would never, ever, not cache a defaults value if it was performance critical. Just do something like
float value = [defaults floatForKey:@"key"]; (or whatever the API on NSUserDefaults is) and then just use the float instead of loading it from defaults again.
You may be right though, they might not want people tweaking it
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Oct 1999
Location: San Jose, Ca
Status:
Offline
|
|
My point was even more than this that this value should be compiled in so that it can be optimized for. There is a good chance that even putting this into a register would not be as optimized as being compiled in. Any time there is any math with this value this could mean a hit, and since we are talking about 100's of ms, that could actually make a difference.
|
|
|
|
|
|
|
|
|
Dedicated MacNNer
Join Date: Aug 2001
Location: Seattle, WA
Status:
Offline
|
|
Originally posted by larkost:
My point was even more than this that this value should be compiled in so that it can be optimized for. There is a good chance that even putting this into a register would not be as optimized as being compiled in. Any time there is any math with this value this could mean a hit, and since we are talking about 100's of ms, that could actually make a difference.
The difference is maybe a single load, since you're going to have to store the value into a register to use it in any sort of computation, anyway.
Compared to the rest of what WebCore and Safari do during the transition between pages, it matters such an infinitesimal amount that you might as well not worry about it.
There are many defaults in OmniWeb which are used in the same way (cache it from defaults once, and then use many times).
More to the point: if you really want to find out if Safari uses a hidden default for this, there are a couple of ways I can think of to do that. You could run the 'strings' command on Safari from the Terminal, like so:
Find something that looks promising in the output, and try setting it via the 'defaults write' command.
Or, you could attach to Safari in GDB and set a breakpoint for -[NSUserDefaults objectForKey:] (also maybe some of the other somethingForKey: methods). Then print out $r5, like so:
You should get the key that Safari is looking up from defaults.
Hope that helps! Good luck!
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Aug 2001
Status:
Offline
|
|
Well... I think I found it.
WebKitInitialTimedLayoutDelay
However, I can't see any effect when changing it.
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Aug 2001
Status:
Offline
|
|
Turns out that it works, but Safari overwrites its prefs when you quit it, so it doesn't work if you do it while Safari is running (even if you then quit and relaunch).
|
|
|
|
|
|
|
|
|
Fresh-Faced Recruit
Join Date: Dec 2003
Status:
Offline
|
|
Anyone know how to increase the number of web addresses Safari rememers. Currently its 1000 but thats annoying when a work website has been cleared. I am pretty sure that tin Windows it is indefinite. Thanks
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|