PATCH - HOME URL and profiles
Dawit A.
adawit at kde.org
Tue Sep 21 00:21:24 BST 2004
On Sunday 19 September 2004 17:17, Alexander Neundorf wrote:
> On Sunday 19 September 2004 16:13, Dawit A. wrote:
> > It would be better to do what you suggest if this was a critical path.
> > But how many times does one press the Home button ? If not all the time,
> > then why store the Home URL in memory ? My patch is not the only one that
> > does this btw. In fact I based the code that reads from the config file
> > on the function that creates a new window when a user requests one.
> > Anyways, I am also too lazy to check the many paths that might be invoved
> > in switching profiles and ensure a proper Home URL is loaded when that
> > profile gets activated. :)
>
> Well, it's no critical path. Nevertheless, getting the profile string from
> a variable in main memory takes on an idle low end box (e.g. K6/200 128 MB)
> probably less then 10 microseconds. Via the file it takes approx. 10
> milliseconds (from earlier measurements of KDE config file loading). This
> is approx. 1000 times more. It involves file i/o, several malloc()s and a
> load of string comparisons.
> Now if this box is not idle but busy (e.g. compiling KDE ;-), then the fast
> option will still only take < 1 ms, while the slow option (file i/o,
> malloc(),...) will probably take much much more then 10 ms, and suddenly an
> function which was fast even under load has become slow under load :-/
Well it is not hard after all to do this. Actually it simplifies the code a
bit. Attached is a new patch that reads the HomeURL address when the profile
is first loaded. I have also reconsidered the need to keep the last typed
Home URL and got rid of that bool option.
--
Regards,
Dawit A.
"Preach what you practice, practice what you preach"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: home-url.diff
Type: text/x-diff
Size: 3211 bytes
Desc: not available
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20040920/c18fb532/attachment.diff>
More information about the kfm-devel
mailing list