lyx_mirror/src/support
Jean-Marc Lasgouttes 6bbd88accf Improve (modestly) the performance of font metrics caches
This fixes two performance issues and improves the performance of
TextMetrics::redoParagraph by 15% in a workload that uses the cache a
lot. The difference will be much less when the cache is not used much.

1/ repetion of the hash code computation

The code
  if (cache.contains(key))
  	result = cache[key]:
is not efficient, since qHash(key) has to be computed twice.
To fix this a new Cache::object_str() method is added, which allows
  if (auto * obj = cache.object(key))
  	result = *obj;

2/ code of has code computation

Instead of using a verbose string that is complicated to build as
key, new key structs BreakAtKey and TextLayoutKey are introduced,
along with the relevant qHash() implementation.
2021-09-24 17:12:15 +02:00
..
linkback
tests Cmake build Qt6: Remove some redundant statements. 2021-03-24 11:42:39 +01:00
.gitignore
any.h Compilation fix 2020-11-21 19:54:43 +01:00
AppleScript.h
AppleScript.m
AppleScriptProxy.cpp
AppleSpeller.h
AppleSpeller.m
AppleSupport.h #11756 Respect system preferences for tabbing on Mac 2020-09-04 23:28:27 +02:00
AppleSupport.m #11756 Respect system preferences for tabbing on Mac 2020-09-04 23:28:27 +02:00
bind.h
Cache.h Improve (modestly) the performance of font metrics caches 2021-09-24 17:12:15 +02:00
Changer.h Amend 9b1dc338b2. Fix compilation in GCC 4.9 2020-11-15 22:41:38 +02:00
checksum.cpp Use crc32 calculation from zlib instead of boost 2020-12-28 21:32:56 +02:00
checksum.h Use crc32 calculation from zlib instead of boost 2020-12-28 21:32:56 +02:00
CMakeLists.txt prevent Qt6 from defining UNICODE (Qt6.1.1 and upwards) 2021-06-19 10:48:49 +02:00
ConsoleApplication.cpp
ConsoleApplication.h
ConsoleApplicationPrivate.h Fix deprecation warning (from|toTime_t) 2021-03-12 10:32:03 +01:00
convert.cpp Use to_string instead of boost::lexical_cast 2020-12-10 20:14:40 +02:00
convert.h Fix linking problem by adding convert from string to unsigned long long. 2020-10-14 22:28:10 -04:00
copied_ptr.h
counter_reps.cpp New counter manipulation inset. 2020-04-30 23:09:36 -04:00
counter_reps.h New counter manipulation inset. 2020-04-30 23:09:36 -04:00
debug.cpp Produce an error on bad debug level values 2021-03-26 17:55:54 +01:00
debug.h Produce an error on bad debug level values 2021-03-26 17:55:54 +01:00
docstream.cpp Use const references 2020-11-01 22:23:26 +02:00
docstream.h Use const references 2020-11-01 22:23:26 +02:00
docstring_list.h
docstring.cpp Refactoring 2020-10-05 14:55:00 +02:00
docstring.h
environment.cpp Prepend dir containing created dtl executables to PATH 2020-04-13 12:51:04 +02:00
environment.h
ExceptionMessage.h Amend efc0877f 2020-10-05 09:37:15 +02:00
FileMonitor.cpp Replace calls from make_unique to lyx::make_unique 2021-01-15 11:36:14 +01:00
FileMonitor.h Merge namespace signals2 into namespace lyx 2020-12-19 22:52:51 +02:00
FileName.cpp Reformat mangled filenames for (xhtml) export to have them sorted. 2021-07-09 14:35:01 +02:00
FileName.h Revert "Add move constructor and move assignment operator for FileName class" 2021-01-14 03:08:12 -05:00
FileNameList.h
filetools.cpp Stop using a GCC extension for an unprintable character in regex. 2021-02-13 18:23:20 +01:00
filetools.h Introduce InputGlobal (#12087) 2021-01-26 08:42:39 +01:00
ForkedCalls.cpp Use new signal library nod instead of boost::signals2 2020-12-13 23:11:19 +02:00
ForkedCalls.h Merge namespace signals2 into namespace lyx 2020-12-19 22:52:51 +02:00
functional.h
gettext.cpp
gettext.h
gzstream.cpp Fix warnings in support/. 2020-02-29 00:06:35 -05:00
gzstream.h Move <fstream> from support/gzstream.h 2020-10-14 15:12:48 +02:00
kill.cpp
lassert.cpp Remove duplicate and unused header includes in .cpp files 2020-10-19 18:01:11 +03:00
lassert.h
Length.cpp Simplify Length 2020-11-21 00:32:47 +02:00
Length.h Simplify Length 2020-11-21 00:32:47 +02:00
lengthcommon.cpp #9376 prepare use of Length in lyxrc - move the class Length to support 2020-08-07 09:24:31 +02:00
limited_stack.h
lstrings.cpp Count words in hyperlink 2021-01-10 01:54:40 -05:00
lstrings.h Count words in hyperlink 2021-01-10 01:54:40 -05:00
lyxalgo.h Use range-based loops 2020-11-21 20:32:16 +02:00
lyxlib.h
lyxmagic.h Cleanup headers 2020-11-25 02:43:16 +02:00
lyxtime.cpp Fix deprecation warning (from|toTime_t) 2021-03-12 10:32:03 +01:00
lyxtime.h
Makefile.am Fix make check 2021-01-31 15:21:23 +01:00
Messages.cpp Fix warning with --disable-nls 2020-01-27 15:34:27 +01:00
Messages.h Run codespell on src/support 2020-06-25 23:17:18 +02:00
mutex.cpp Allow compiling with Qt6 2021-03-15 17:09:09 +01:00
mutex.h
numpunct_lyx_char_type.h
os_cygwin.cpp
os_unix.cpp update canAutoOpenFile/autoOpenFile implementation to new MacOSX API, avoid deprecated calls 2020-02-06 21:52:46 +01:00
os_win32.cpp Move include of own header to the top. Fix dependencies 2020-10-25 19:58:57 +02:00
os_win32.h Move Windows-specific stuff into os_win32.h 2020-10-25 19:59:03 +02:00
os.cpp Include standard <regex> 2020-11-29 15:27:28 +02:00
os.h
Package.cpp Cmake build with qt6 on MAC 2021-03-26 13:11:44 +01:00
Package.h Run codespell on src/support 2020-06-25 23:17:18 +02:00
PathChanger.cpp
PathChanger.h
pmprof.h
ProgressInterface.h
qstring_helpers.cpp Fix toqstr(chart_type) with Qt6 (#12252) 2021-04-17 15:10:26 +02:00
qstring_helpers.h is_utf8 is always passed a char. 2020-05-03 15:02:25 -04:00
RandomAccessList.h Fix compilation with MSVC 19. 2021-01-02 17:27:56 +01:00
signals.h Move Trackable class to Server.h 2020-12-19 22:52:57 +02:00
socktools.cpp
socktools.h
strfwd.h
Systemcall.cpp Fixup 9f92fc92: improve FIXME in SystemcallPrivate::startProcess 2021-05-20 13:20:20 +02:00
Systemcall.h Fix header. 2020-02-29 00:06:35 -05:00
SystemcallPrivate.h Remove unused forward declarations 2020-10-13 09:57:36 +03:00
TempFile.cpp Mark constructors with only one parameter as explicit 2019-09-16 00:01:48 +02:00
TempFile.h
textutils.h Use Common Number separator instead of European to detect numbers 2020-07-10 18:06:41 +02:00
Timeout.cpp Move include of own header to the top. Fix dependencies 2020-10-25 19:58:57 +02:00
Timeout.h Merge namespace signals2 into namespace lyx 2020-12-19 22:52:51 +02:00
Translator.h
trivstring.cpp
trivstring.h
types.h Move several common types to support/types.h 2020-11-27 12:16:22 +02:00
unicode.cpp Refactoring based on cppcheck suggestions 2020-10-03 13:39:51 +02:00
unicode.h Run codespell on src/support 2020-06-25 23:17:18 +02:00
unique_ptr.h
userinfo.cpp
userinfo.h
weighted_btree.h