1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-30 21:55:31 +02:00
Find a file
Andrew Eidsness f7d49e5bde Bug 425711: User preference to limit tokens per translation unit
This adds a new scalability preference that aborts parsing when too many
Tokens are created for a single translation unit.  This is a heuristic
that fairly close predicts the files that will be too complex for the
indexer to handle.

The token counter is disabled by default.

When it is enabled, the default token limit is 25,000,000.  This value
was determined by counting the number of Tokens produced for each
translation unit in the boost-1.55.0 sources:

sqlite> select * from counts where count > 10000000;
count       location
-----------------------------------------------------------------
100000001   libs/local_function/test/all_decl.cpp
100000001   libs/local_function/test/all_decl_seq.cpp
100000001   libs/local_function/test/all_decl_seq_nova.cpp
100000001   libs/preprocessor/doc/examples/array_arithmetic.c
99808587    libs/function_types/build/preprocess_arity_loops.cpp
62380381    libs/preprocessor/doc/examples/delay.c
58096841    libs/serialization/performance/xml/string256_test.cpp
58096828    libs/serialization/performance/xml/int256_test.cpp
52898416    libs/mpi/src/python/collectives.cpp
52573708    boost/spirit/home/support/char_encoding/ \
                  unicode/create_tables.cpp
21315014    libs/utility/binary_test.cpp
18799536    libs/math/test/test_rational_instances/ \
                 test_rational_double1.cpp
17758615    libs/mpl/test/string.cpp
13100401    libs/container/bench/bench_set.cpp
11976021    libs/local_function/example/const_block.cpp
11381198    libs/math/test/test_tr1.cpp
10432186    libs/parameter/test/preprocessor.cpp

This value means that the indexer will process all files in boost
without running out of memory on a 1Gb heap.

Change-Id: Ia9fc73dfb38454cc8735f537e3ac6e661864fb4f
Signed-off-by: Andrew Eidsness <eclipse@jfront.com>
Reviewed-on: https://git.eclipse.org/r/22386
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
IP-Clean: Doug Schaefer <dschaefer@qnx.com>
Tested-by: Doug Schaefer <dschaefer@qnx.com>
2014-02-27 12:49:35 -05:00
build Enabled JDK 1.7. 2014-01-24 13:38:55 -05:00
codan Bug 428725 - Severity selection from Coda Analyses preferences should 2014-02-23 15:45:37 -05:00
core Bug 425711: User preference to limit tokens per translation unit 2014-02-27 12:49:35 -05:00
cross Bug 428367 - Fixed missing title for Properties dialog 2014-02-18 09:37:26 -05:00
debug Bug 427898: Allow changing breakpoint type 2014-02-24 07:26:49 -05:00
doc bug 428230: What's New and Noteworthy in CDT 8.3? 2014-02-14 16:43:56 -05:00
dsf Update GdbMemoryBlockRetrieval and DsfMemoryBlockRetrieval to fix 2014-02-27 09:55:46 -05:00
dsf-gdb Bug 428990 - Breakpoint problem marker has a too generic error message 2014-02-27 11:02:49 -05:00
jtag Bug 426586 - [launch] Rename launch delegates to be more descriptive to 2014-01-27 15:42:30 -05:00
launch/org.eclipse.cdt.launch Bug 426586 - [launch] Rename launch delegates to be more descriptive to 2014-01-27 15:42:30 -05:00
llvm Bumped up CDT version to 8.4. 2014-01-21 17:35:29 -05:00
lrparser Improved consistency of test method names. 2014-02-10 20:12:55 -08:00
memory Bug 426730: [Memory] Support 16 bit addressable size 2014-02-26 10:59:03 -05:00
p2 Enabled JDK 1.7. 2014-01-24 13:38:55 -05:00
qt Bug 426784: Qt Codan checker uses wrong type 2014-01-29 16:12:49 -05:00
releng Enabled JDK 1.7. 2014-01-24 13:38:55 -05:00
testsrunner Bug 426586 - [launch] Rename launch delegates to be more descriptive to 2014-01-27 15:42:30 -05:00
upc Enabled JDK 1.7. 2014-01-24 13:38:55 -05:00
util Enabled JDK 1.7. 2014-01-24 13:38:55 -05:00
visualizer Enabled JDK 1.7. 2014-01-24 13:38:55 -05:00
windows Enabled JDK 1.7. 2014-01-24 13:38:55 -05:00
xlc Enabled JDK 1.7. 2014-01-24 13:38:55 -05:00
.gitignore Ignore NFS-created files. 2012-11-08 13:34:54 -08:00
pom.xml Bumped up CDT version to 8.4. 2014-01-21 17:35:29 -05:00