qt6-bb10/src
Jędrzej Nowacki 053e8c41d7 Use file mapping in moc.
The change reduces heap allocations by using file mapping instead of
reading a whole file into memory just to create a slightly modified
copy of it.

For this small test case:

 moc <<EOF
  class X : public QObject { Q_OBJECT Q_PROPERTY(int x) };
 EOF

massif shows improvement from:
peak cost: "26,8 KB"  heap "2,1 KB"  heap extra "0 B"  stacks
to:
peak cost: "11,3 KB"  heap "2,2 KB"  heap extra "0 B"  stacks

In general, depending on source file high peak memory usage is reduced
from few to few hundreds KB, especially that the allocation used to
happen for each include file too.

Change-Id: I9c1c848be848444156af25a991b67161fb9d8b29
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-10-30 16:41:39 +01:00
..
3rdparty Merge remote-tracking branch 'origin/5.4' into dev 2014-10-09 17:56:52 +02:00
android Allow QtCreator to pass additional args and env vars to the application. 2014-10-23 08:53:58 +02:00
angle ANGLE: Upgrade to 2.1~abce76206141 2014-09-29 16:09:29 +02:00
concurrent Update license headers and add new license files 2014-09-24 12:26:19 +02:00
corelib Make Q_INVOKABLE work on Q_GADGET 2014-10-30 13:29:15 +01:00
dbus QtDBus: use qEnvironmentVariableIntValue() 2014-10-17 09:51:11 +02:00
gui Clean up ShortcutOverride handling 2014-10-30 11:40:18 +01:00
network Merge remote-tracking branch 'origin/5.4' into dev 2014-10-27 13:00:36 +01:00
opengl Doc: Use title case in section1 titles 2014-09-30 13:52:51 +02:00
openglextensions purge vestiges of opengl es 1 support 2014-04-04 19:32:21 +02:00
platformheaders Doc: Adding API reference section in Qt Platform Headers page. 2014-09-30 21:00:50 +02:00
platformsupport QGenericUnixTheme::xdgIconThemePaths: add /usr/share/pixmaps 2014-10-29 09:12:38 +01:00
plugins Clean up ShortcutOverride handling 2014-10-30 11:40:18 +01:00
printsupport QPrinter - Fix DuplexMode on all platforms 2014-10-24 21:34:21 +02:00
sql Merge "Merge remote-tracking branch 'origin/5.4' into dev" into refs/staging/dev 2014-10-28 10:32:06 +01:00
testlib Clean up ShortcutOverride handling 2014-10-30 11:40:18 +01:00
tools Use file mapping in moc. 2014-10-30 16:41:39 +01:00
widgets Clean up ShortcutOverride handling 2014-10-30 11:40:18 +01:00
winmain Merge remote-tracking branch 'origin/5.3' into 5.4 2014-08-12 13:05:02 +02:00
xml Merge remote-tracking branch 'origin/5.4' into dev 2014-10-20 19:12:25 +02:00
src.pro Remove vestiges of d3dcompiler_qt 2014-09-02 21:55:41 +02:00