On 03/26/2013 07:50 AM, David Engster wrote:
> What I've seen quite often in ELP results from larger parsing workloads
> is that semantic--tag-link and -unlink-from-buffer can take quite some
> time, since they are called for every tag. I usually see roughly about
> 15% of time spend with this during parsing.
> I can understand why we would have to link tags to overlays in open
> buffers, but why for files which are opened, parsed and then immediately
> closed again? Couldn't we skip this somehow in this case?
That sounds like a good idea.
The function semanticdb-create-table-for-file-not-in-buffer seems like a
logical starting point for experimentation, but semantic-fetch-tags
seems like the wrong place to add such trickery for it to use. It is
probably ok to just call semantic-parse-region directly. Complexity
goes up from there though since semanticdb next depends on the cached
tags being linked by overlays. There would be a ripple effect of tweaks
needed unless large chunks of the regular infrastructure is skipped
outright in semanticdb-create-table-for-file-not-in-buffer.
The next puzzle would be using the -not-in-buffer function more
aggressively. I think it is underutilized due to the convenience (and
shorter name of) semanticdb-file-table-object.
Anyway, a neat idea, but I expect some trickiness to it.