1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-23 17:05:26 +02:00
cdt/core
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
..
org.eclipse.cdt.alltests Bumped up CDT version to 8.4. 2014-01-21 17:35:29 -05:00
org.eclipse.cdt.core Bug 425711: User preference to limit tokens per translation unit 2014-02-27 12:49:35 -05:00
org.eclipse.cdt.core.aix Bumped up CDT version to 8.4. 2014-01-21 17:35:29 -05:00
org.eclipse.cdt.core.linux Enabled JDK 1.7. 2014-01-24 13:38:55 -05:00
org.eclipse.cdt.core.linux.ia64 Bumped up CDT version to 8.4. 2014-01-21 17:35:29 -05:00
org.eclipse.cdt.core.linux.ppc Bumped up CDT version to 8.4. 2014-01-21 17:35:29 -05:00
org.eclipse.cdt.core.linux.ppc64 Bumped up CDT version to 8.4. 2014-01-21 17:35:29 -05:00
org.eclipse.cdt.core.linux.x86 Bumped up CDT version to 8.4. 2014-01-21 17:35:29 -05:00
org.eclipse.cdt.core.linux.x86_64 Bumped up CDT version to 8.4. 2014-01-21 17:35:29 -05:00
org.eclipse.cdt.core.macosx Bumped up CDT version to 8.4. 2014-01-21 17:35:29 -05:00
org.eclipse.cdt.core.qnx Bug 314504 ProcessList leaks file descriptors during #getProcessList() 2010-05-27 10:01:52 +00:00
org.eclipse.cdt.core.solaris Bumped up CDT version to 8.4. 2014-01-21 17:35:29 -05:00
org.eclipse.cdt.core.tests Bug 427002. [ast rewrite] Comments originating from other translation 2014-02-26 10:16:13 -05:00
org.eclipse.cdt.core.win32 Bumped up CDT version to 8.4. 2014-01-21 17:35:29 -05:00
org.eclipse.cdt.core.win32.x86 Bumped up CDT version to 8.4. 2014-01-21 17:35:29 -05:00
org.eclipse.cdt.core.win32.x86_64 Bumped up CDT version to 8.4. 2014-01-21 17:35:29 -05:00
org.eclipse.cdt.ui Bug 425711: User preference to limit tokens per translation unit 2014-02-27 12:49:35 -05:00
org.eclipse.cdt.ui.tests Removed unused constants. 2014-01-29 17:23:26 -08:00