Closed Quuxplusone closed 7 years ago
Attached libclangclient_source_and_testinput.zip
(955 bytes, application/zip): libclangclient.cpp and testinput.cpp
What happens when save a preprocessed version of this header and then include that?
> What happens when save a preprocessed version of this header and then include
that?
Without the preamble generation:
Parsing
D:\work\libclangclient.windows.slow_header\libclangclient_source_and_testinput\testinput.cpp:
2.9844 (100.0%) 0.0156 (100.0%) 3.0000 (100.0%) 3.0781 (100.0%)
Reparsing
D:\work\libclangclient.windows.slow_header\libclangclient_source_and_testinput\testinput.cpp:
3.0469 (100.0%) 0.0156 (100.0%) 3.0625 (100.0%) 3.0782 (100.0%)
Reparsing
D:\work\libclangclient.windows.slow_header\libclangclient_source_and_testinput\testinput.cpp:
3.1094 (100.0%) 0.0313 (100.0%) 3.1406 (100.0%) 3.2206 (100.0%)
Reparsing
D:\work\libclangclient.windows.slow_header\libclangclient_source_and_testinput\testinput.cpp:
2.8750 (100.0%) 0.0938 (100.0%) 2.9688 (100.0%) 2.9659 (100.0%)
Reparsing
D:\work\libclangclient.windows.slow_header\libclangclient_source_and_testinput\testinput.cpp:
3.0000 (100.0%) 0.0625 (100.0%) 3.0625 (100.0%) 3.0781 (100.0%)
Reparsing
D:\work\libclangclient.windows.slow_header\libclangclient_source_and_testinput\testinput.cpp:
3.0625 (100.0%) 0.0313 (100.0%) 3.0938 (100.0%) 3.0938 (100.0%)
And with it enabled:
Parsing
D:\work\libclangclient.windows.slow_header\libclangclient_source_and_testinput\testinput.cpp:
3.0313 (100.0%) 0.0156 (100.0%) 3.0469 (100.0%) 3.0626 (100.0%)
Precompiling preamble: 8.1406 (100.0%) 0.0625 (100.0%) 8.2031 (100.0%)
8.2188 (100.0%)
Reparsing
D:\work\libclangclient.windows.slow_header\libclangclient_source_and_testinput\testinput.cpp:
8.2500 (100.0%) 0.0625 (100.0%) 8.3125 (100.0%) 8.3281 (100.0%)
Reparsing
D:\work\libclangclient.windows.slow_header\libclangclient_source_and_testinput\testinput.cpp:
0.1094 (100.0%) 0.1094 (100.0%) 0.1093 (100.0%)
Reparsing
D:\work\libclangclient.windows.slow_header\libclangclient_source_and_testinput\testinput.cpp:
0.1094 (100.0%) 0.1094 (100.0%) 0.1094 (100.0%)
Reparsing
D:\work\libclangclient.windows.slow_header\libclangclient_source_and_testinput\testinput.cpp:
0.0938 (100.0%) 0.0156 (100.0%) 0.1094 (100.0%) 0.1094 (100.0%)
Reparsing
D:\work\libclangclient.windows.slow_header\libclangclient_source_and_testinput\testinput.cpp:
0.0938 (100.0%) 0.0156 (100.0%) 0.1094 (100.0%) 0.1093 (100.0%)
I cannot reproduce this with trunk, can you verify that?
Ok, I managed to reproduce it. Turns out the time that a reparse-with-preamble is fully spend in ASTUnit::TranslateStoredDiagnostics.
Fixed in r295301.
Yup, looks much better now (with preamble generation turned on):
Parsing D:\work\libclangclient_source_and_testinput\testinput.cpp: 7.6406
(100.0%) 0.1250 (100.0%) 7.7656 (100.0%) 7.8553 (100.0%)
Precompiling preamble: 12.5469 (100.0%) 0.2188 (100.0%) 12.7656 (100.0%)
12.9001 (100.0%)
Reparsing D:\work\libclangclient_source_and_testinput\testinput.cpp: 13.6875
(100.0%) 0.2500 (100.0%) 13.9375 (100.0%) 14.0979 (100.0%)
Reparsing D:\work\libclangclient_source_and_testinput\testinput.cpp: 1.1250
(100.0%) 0.0625 (100.0%) 1.1875 (100.0%) 1.1958 (100.0%)
Reparsing D:\work\libclangclient_source_and_testinput\testinput.cpp: 1.1719
(100.0%) 0.0469 (100.0%) 1.2188 (100.0%) 1.2085 (100.0%)
Reparsing D:\work\libclangclient_source_and_testinput\testinput.cpp: 1.2500
(100.0%) 0.0313 (100.0%) 1.2813 (100.0%) 1.2881 (100.0%)
Reparsing D:\work\libclangclient_source_and_testinput\testinput.cpp: 1.2031
(100.0%) 0.0313 (100.0%) 1.2344 (100.0%) 1.2232 (100.0%)
libclangclient_source_and_testinput.zip
(955 bytes, application/zip)