Krazy2 plugin for KDevelop
Andreas Pakulat
apaku at gmx.de
Mon Oct 29 22:17:52 UTC 2012
Hi,
On Mon, Oct 29, 2012 at 9:30 PM, Daniel Calviño Sánchez
<danxuliu at gmail.com> wrote:
> That is pretty much what the plugin does. Not very impressive, I know
> :P
I think its impressive enough, in particular knowing the scarceness of
our API docs and the steep learning curve to understand how the
plugins work and finding how to write one.
> Besides those ideas, there is a problem that should also be tackled:
> if a directory with a lot of files (hundreds of thousands) happens to
> be selected to be analyzed, the KDevelop GUI will freeze while the
> plugin is getting the list of files. Probably no one would need to run
> a Krazy2 analysis from KDevelop on a directory with hundreds of
> thousands of files, but even if it is selected by mistake, a freezed
> GUI does not look good from a user perspective :)
Sounds like that task is currently triggered from a UI element, i.e. a
button or so and then directly executed inside the function. Instead
you could run the "fetch the list of files" in a separate thread,
either by utilizing the ThreadWeaver API or QtConcurrent. If possible
it would be good to have all the code that is executed to fetch files,
run them through krazy and generate the analysis data inside of a KJob
subclass and make it cancellable as far as possible so such long runs
can be aborted if done by mistake. Thats just guesswork on my part, so
if thats already whats happening just ignore me :)
Andreas
More information about the KDevelop-devel
mailing list