Small API change exception for KActivities::Info
Albert Astals Cid
aacid at kde.org
Tue Jan 15 21:42:42 GMT 2013
El Dimarts, 15 de gener de 2013, a les 12:51:38, Ivan Čukić va escriure:
> Hi all,
Hi
> I'm requesting an api freeze exception for the KActivities::Info class to
> introduce a simple const method:
> bool isResourceLinked(const KUrl & url);
>
> The implementation for the method already exists, it is just not published
> in the API.
>
> The reason for this is that because the former doesn't exist, some* are
> using the currently existing (and deprecated**) method - linkedResources -
> which returns a list of all linked resources like this:
> linkedResources().contains(...)
>
> This is *very* bad - it is slow - just to check linking for one specific
> resource, the above line queries nepomuk for the whole list of resources,
> those resources are then transferred via d-bus to kactivitymanagerd, then
> (again via dbus) from kactivitymanagerd to the client that uses the library.
>
> This could have been a simple yes/no question, with a much faster sparql
> query than retrieving the whole list is.
If it's going to make things faster and it's just exposing an existing method
i'd say go for it, after all people are committing patches that are 200 lines
wrong and breaking the build and adding stuff that could be argued that are
features so there's no need for you to hold back of what seems a really small
thing (though we haven't seen the patch).
Cheers,
Albert
>
> I have Marco's +1 on this.***
>
> Cheerio,
> Ivan
>
> * Share-Like-Connect that will be released with PA4, and for normal Plasma
> soon after 4.10 is released
> ** Deprecated because it is blocking, and slow
> *** http://mail.kde.org/pipermail/plasma-devel/2013-January/023496.html
More information about the kde-core-devel
mailing list