]> git.lyx.org Git - features.git/commit
Fix slowness problem on Windows reported on the list.
authorRichard Kimberly Heck <rikiheck@lyx.org>
Fri, 14 Dec 2018 15:55:16 +0000 (10:55 -0500)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 18 Jun 2020 12:39:51 +0000 (14:39 +0200)
commit1ce8549913f3ca95a239d380a81afe6d07cda10c
tree7cbc3f05d7010c4aa1ed858ca7be23d4cb8f15a5
parent889e0f5c36c8bf927e537d42dd37f5786c1c4fc3
Fix slowness problem on Windows reported on the list.

https://marc.info/?l=lyx-devel&m=154458979925296&w=2

This is related to the fix for #9158 and the caching of bibfile
information. On Windows, it is incredibly slow to run kpsewhich,
which we do to check where files actually are, so as to get info
about them (e.g., timestamps). So we have started to cache that
as a map. The map is supposed to be invalidated when various
things happen, but an oversight was causing it to be invalidated
on every cut operation. This is because cutting uses a temporary
Buffer, and the operations on it were affecting the *global* cache
of biblio file info. (It makes sense to have a global cache, since
these files are not document-specific.) Basically, we have to update
the list of bibfiles in that temporary Buffer---but that is one of
the things that invalidated the cache. The solution is only to
invalidate the cache if the list of bibfiles has actually changed
(a sensible idea anyway). The only time that will happen in the
temporary Buffer is when the copied information contains a BibTeX
inset. That should be fairly rare.
src/Buffer.cpp