Hi,

On Tuesday 09 August 2011, meik michalke wrote:
> i just committed a small change to .rk.get.installed.packages() in svn. it
> adds two new elements to the list, one is a logical vector (whether
> "Enhances" in DESCRIPTION lists "rkward"), and the last one lists the
> found pluginmaps with full path.

nice! Note that this caused a (harmless) assert failure in 
rkloadlibsdialog.cpp (i.e. the package management dialog), since that expects 
.rk.get.installed.packages() to return four fields, only. Fixed.

> both entries are independent of the
> other, that is, the function does scan for a pluginmap even if there's no
> "Enhances: rkward" defined.

Why not limit the search to those packages with Enhances: rkward?

> the whole scanning doesn't slow down the function notably.

In fact the scanning is faster than I had expected, though. But still, it 
seems to make up ~10% of the time spend in .rk.get.installed.packages(), and 
so perhaps that can be enhanced a bit.

(Timing is a bit difficult, since the metric of interest is time spent with 
cold 
disk cache. When the disk cache is hot, .rk.get.installed.packages() is pretty 
fast, anyway).

While at it, I'd also suggest splitting the check for pluginmaps into an 
entirely separate function, since this would also have to be called for newly 
installed / updated packages. At startup, internally, we would call
  .rk.find.package.pluginmaps (x$LibPath[x$EnhanceRK], x$Package[x$EnhanceRK])
to get a list of installed pluginmaps. One further potential advantage is that 
in this approach, packages could provide more than just one .pluginmap.

> i did two other small changes to it: i named the returned list elements (as
> seen above, which shouldn't hurt) and replaced
> 
>   library()$Title
> 
> and its checks with
> 
>   installed.packages(fields="Title")
> 
> which should give the same results in one go.

Much better solution, indeed!

Regards
Thomas

Attachment: signature.asc
Description: This is a digitally signed message part.

------------------------------------------------------------------------------
uberSVN's rich system and user administration capabilities and model 
configuration take the hassle out of deploying and managing Subversion and 
the tools developers use with it. Learn more about uberSVN and get a free 
download at:  http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________
RKWard-devel mailing list
RKWard-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rkward-devel

Reply via email to