system kioslave and KURL::isLocalFile()

Kévin Ottens ervin at ipsquad.net
Wed Jul 27 09:00:13 BST 2005


Le Mercredi 27 Juillet 2005 09:14, Andras Mantia a écrit :
> Isn't this a bit overkill? Static a file can be expensive and until now
> we could rely that isLocalFile() is a fast method. Can system:// and
> home:// be not a local file? If it cannot be, I think the check in KURL
> should be modified.

Well, the problem is not really there IMHO. In fact most applications expect 
that if isLocalFile() is true, then they can use the path as a unix path. So 
isLocalFile() is really synonym of protocol=="file" in the end. This check 
can't be changed it would break a lot of things.

As for the stat() cost, we might have a solution. We could introduce another 
flag for protocols indicating if they use UDS_LOCAL_PATH or not (this is the 
UDS Atom used to translate in local path). Then we could avoid the stat() in 
NetAccess::mostLocalURL() when this flag is false.

Regards.
-- 
Kévin 'ervin' Ottens, http://ervin.ipsquad.net
"Ni le maître sans disciple, Ni le disciple sans maître,
Ne font reculer l'ignorance."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20050727/1c35b3fe/attachment.sig>


More information about the kde-core-devel mailing list