Jürgen Spitzmüller wrote:
Richard Heck wrote:
This would do, in the sense that it'll get the result we want. But let
me try to explain the problem again. The function loadIfNeeded() is
called for every single keypress, mouse press, or whatever, for every
InsetInclude.
Hm, this is a problem in itself, I'd say.
That doesn't look so bad, though we should bring Stefan S into the
discussion. This happens because updateMacros checks all the
InsetInclude's to make sure their files are loaded.
So this patch has the effect that the checksum is
re-calculated on every keypress, etc, if a file has failed to load. I
have to think that could slow things down significantly, though of
course I could be wrong. Obviously, it would be quicker to check the
modtime, but I worry that this too could make things slow....
But this is only for documents where the child failed to load.
Yes, I know. And it should be fairly rare that the file exists but can't
be loaded.
A quick test showed that it isn't that slow.
Locally, probably not, since the file will be cached locally. But over a
network drive? Anyway, perhaps we should check the modtime instead, as
that will surely be faster.
And the current solution (failed once and for all) is no option either, IMHO.
This situation should be rare---it's either a corrupted LyX file or a
format mismatch---and it'd be ever rarer that a user would resolved the
problem while still having that file open. Once you close it and
re-open---you don't have to restart LyX---it'll try to load the child
again. But still, I agree with you that a better solution is wanted.
rh