X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FConverterCache.cpp;h=7590336411548428ea2f8020ecd85026a49af5bb;hb=5fd21db9d4ed2fab4c76f1c9c95ddfa068690208;hp=1451f6e714f6b3cd7356d26c3fe744d6dd3e2afd;hpb=065db6806771190d12d37d64c4c86f9c5ebaf225;p=lyx.git diff --git a/src/ConverterCache.cpp b/src/ConverterCache.cpp index 1451f6e714..7590336411 100644 --- a/src/ConverterCache.cpp +++ b/src/ConverterCache.cpp @@ -56,7 +56,7 @@ static FileName cache_dir; class CacheItem { public: - CacheItem() {} + CacheItem() : timestamp(0), checksum(0) {} CacheItem(FileName const & orig_from, string const & to_format, time_t t, unsigned long c) : timestamp(t), checksum(c) @@ -159,6 +159,10 @@ void ConverterCache::Impl::readIndex() FormatCache & format_cache = cache[orig_from_name]; if (format_cache.from_format.empty()) format_cache.from_format = + // FIXME perf: This very expensive function is called on all + // cached files on opening. This slows LyX startup a lot. It + // would be better if this information was retrieved in a + // delayed fashion. formats.getFormatFromFile(orig_from_name); format_cache.cache[to_format] = item; }