[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kmail-devel
Subject:    Re: [PATCH] simplify strToHtml by using regexps
From:       Michael =?iso-8859-1?q?H=E4ckel?= <Michael () Haeckel ! Net>
Date:       2001-10-01 9:56:36
[Download RAW message or body]

On Sunday 30 September 2001 20:30, Marc Mutz wrote:
>
> Shall I bother myself with doing so?

If you believe that you can gain at least the same speed with QRegExp, than 
the current implementation has, then yes.

At least I don't believe that this is possible, since the QRegExp can only do 
as some kind of interpreter what we are doing directely compiled.

But feel free to prove the opposite :-)

Speed is definitely the most important thing here, and this is one of the most 
time critical functions in KMail. Many people complain already about it being 
too slow for long text only mails.

Assuming, that MIME and HTML parsing also takes a lot of time, the slowdown in 
this function is surely much higher than just the measured factor 3.

> The most important asset of the regexp version is the ease in which they
> are maintained and extended. We could even load the mailto and http/ftp
> regexp's from the config file for easy testing. I saw this while I
> tried to track down the 70 @ bug. It was much faster to write the
> regexp version than trying to digest what the old version was doing.
>
> Already, the regexp version handles a dot at the end of urls perfectly
> well (ie. doesn't consider it part of the url):
> See http://www.w3c.org/blah.html. <- dot not included.

The other version does and did also. That just was broken, when I ported it to 
a QString due to an off by one error.

> We could expand it to include terms like www.kernel.org by just adding a
> single character... Or think of
> http://www.blah.org/blubb.html?query=foo&index=long#ref-14

What's wrong with this URL? It is highlighted correctely here.

Regards,
Michael Häckel
_______________________________________________
Kmail Developers mailing list
Kmail@mail.kde.org
http://mail.kde.org/mailman/listinfo/kmail

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic