This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

C/C++ Index Appears to Rebuild on Save



I have a "C++ Managed Build" project using MinGW GCC in my CCS Version: 11.2.0.00007. Every time I perform save (Ctrl+Save) after an edit, CCS triggers C/C++ indexer to seemingly rebuild the entire index as it takes several minutes to complete and slows down or even freezes the IDE momentarily. I believe the problem is that the indexer tries to process the huge C++ Boost library included in my project. I have tried adjusting the indexer settings and increasing the IDE's memory but short of disabling it entirely, the problem persists.

Opening the same project using the Eclipse (Version: 2021-03 (4.19) Build id: I20210303-1800) from the CCS installation exhibits the same behavior, but interestingly a standalone Eclipse installation (Version: 2021-03 (4.19.0) Build id: 20210312-0638) does not have this issue. Standalone Eclipse still triggers C/C++ indexer on save but the process only takes a split second. I assume it it only updating the index for the modified file, not rebuilding for the whole project.

Following an old thread of the same issue I tried saving the CCS debug log but I don't get anything on Ctrl+Pause/Break. Also attached is an indexer parse log for reference. Any help will be greatly appreciated.

https://e2e.ti.com/support/tools/code-composer-studio-group/ccs/f/code-composer-studio-forum/659011/c-c-workspace-indexer-slowdowns

indexParser.log

Start VM: -Dosgi.instance.area.default=@user.home/workspace_v11
-Djxbrowser.ipc.external=true
-Dorg.eclipse.equinox.http.jetty.customizer.class=com.ti.ccstudio.gui.composer.http.jetty.MaqettaJettyCustomizer
-Dccs.minXDCVersion=3.25.5.1
-Dorg.eclipse.ecf.provider.filetransfer.retrieve.readTimeout=30000
-Dorg.eclipse.ecf.provider.filetransfer.retrieve.closeTimeout=10000
-Dsun.net.client.defaultReadTimeout=30000
-Dsun.net.client.defaultConnectTimeout=10000
-Xms256m
-Xmx2048m
-XX:ErrorFile=C:\Users\u322384\AppData\Local\TEXASI~1\CCS\ccs1120\0\dmp\\hs_err_%p.log
-Djava.class.path=C:\ti\ccs1120\ccs\eclipse\\plugins/org.eclipse.equinox.launcher_1.6.100.v20201223-0822.jar
-os win32
-ws win32
-arch x86_64
-showsplash C:\ti\ccs1120\ccs\eclipse\\plugins\com.ti.ccstudio.branding_10.0.0.202203012100\splash.bmp
-launcher C:\ti\ccs1120\ccs\eclipse\ccstudio.exe
-name Ccstudio
--launcher.library C:\ti\ccs1120\ccs\eclipse\\plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.2.100.v20210209-1541\eclipse_11301.dll
-startup C:\ti\ccs1120\ccs\eclipse\\plugins/org.eclipse.equinox.launcher_1.6.100.v20201223-0822.jar
--launcher.appendVmargs
-product com.ti.ccstudio.branding.product
-debug
-vm C:\ti\ccs1120\ccs\eclipse\jre\bin\client\jvm.dll
-vmargs
-Dosgi.instance.area.default=@user.home/workspace_v11
-Djxbrowser.ipc.external=true
-Dorg.eclipse.equinox.http.jetty.customizer.class=com.ti.ccstudio.gui.composer.http.jetty.MaqettaJettyCustomizer
-Dccs.minXDCVersion=3.25.5.1
-Dorg.eclipse.ecf.provider.filetransfer.retrieve.readTimeout=30000
-Dorg.eclipse.ecf.provider.filetransfer.retrieve.closeTimeout=10000
-Dsun.net.client.defaultReadTimeout=30000
-Dsun.net.client.defaultConnectTimeout=10000
-Xms256m
-Xmx2048m
-XX:ErrorFile=C:\Users\u322384\AppData\Local\TEXASI~1\CCS\ccs1120\0\dmp\\hs_err_%p.log
-Djava.class.path=C:\ti\ccs1120\ccs\eclipse\\plugins/org.eclipse.equinox.launcher_1.6.100.v20201223-0822.jar
Install location:
    file:/c:/ti/ccs1120/ccs/eclipse/
Configuration file:
    file:/c:/ti/ccs1120/ccs/eclipse/configuration/config.ini loaded
Configuration location:
    file:/c:/ti/ccs1120/ccs/eclipse/configuration/
Framework located:
    file:/c:/ti/ccs1120/ccs/eclipse/plugins/org.eclipse.osgi_3.16.200.v20210226-1447.jar
Loading extension: reference:file:org.eclipse.osgi.compatibility.state_1.2.300.v20210212-1137.jar
        eclipse.properties not found
Framework classpath:
    file:/c:/ti/ccs1120/ccs/eclipse/plugins/org.eclipse.osgi_3.16.200.v20210226-1447.jar
    file:/c:/ti/ccs1120/ccs/eclipse/plugins/
    file:/c:/ti/ccs1120/ccs/eclipse/plugins/org.eclipse.osgi.compatibility.state_1.2.300.v20210212-1137.jar
Splash location:
    C:\ti\ccs1120\ccs\eclipse\\plugins\com.ti.ccstudio.branding_10.0.0.202203012100\splash.bmp
Debug options:
    file:/C:/ti/ccs1120/ccs/eclipse/.options not found
Time to load bundles: 162
Starting application: 37068
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
com.ti.rov: baseDir = C:/ti/ccs1120/ccs/eclipse/plugins/com.ti.rov_1.0.0.202108240702/webcontents/, url = file:/C:/ti/ccs1120/ccs/eclipse/plugins/com.ti.rov_1.0.0.202108240702/webcontents/
com.ti.rov: globalRoots = []
Chromium userdata location: C:/Users/u322384/workspace_v11/112_workspace/.jxbrowser.userdata
Application started in : 78760ms

CCS HTTP adapter started! [ccs.port:49326] - Open 'http://localhost:49326/ide' in web browser to see listing of available APIs...


  • Hi Stephen,

    Opening the same project using the Eclipse (Version: 2021-03 (4.19) Build id: I20210303-1800) from the CCS installation exhibits the same behavior, but interestingly a standalone Eclipse installation (Version: 2021-03 (4.19.0) Build id: 20210312-0638) does not have this issue. Standalone Eclipse still triggers C/C++ indexer on save but the process only takes a split second. I assume it it only updating the index for the modified file, not rebuilding for the whole project.

    Are the settings for both the CCS and stock Eclipse indexer the same. I wonder if the CCS settings may have the indexer set to be more "aggressive".

    https://mcuoneclipse.com/2021/01/10/eclipse-indexer-debug-tips/

    Perhaps you can also try setting filters to exclude directories from being indexed:

    https://www.blog.cocacoding.com/exclude-files-from-eclipse-indexing/

    Thanks

    ki

  • Hi Ki,

    Thank you for the suggestions. I am unfortunately still seeing the same issue.

    Both my CCS 11.2 and standalone Eclipse are fresh installations with default indexer settings. I verified they are identical in both Workspace level and Project level.

    Attached are indexer debug logs of CCS 11.2. Eclipse in CCS installation, and Standalone Eclipse. The resource filtering didn't seem to change anything. Perhaps this is because the boost library is "included" via project settings rather than linked directly into project workspace.

    ccs1120IndexerDebug.txt

    ccs1120FilterBoostDebug.txt

    eclipseFilteBoostDebug.txt

    Start VM: -Dosgi.requiredJavaVersion=11
    -Dosgi.instance.area.default=@user.home/eclipse-workspace
    -Dsun.java.command=Eclipse
    -XX:+UseG1GC
    -XX:+UseStringDeduplication
    --add-modules=ALL-SYSTEM
    -Dosgi.requiredJavaVersion=11
    -Dosgi.dataAreaRequiresExplicitInit=true
    -Dorg.eclipse.swt.graphics.Resource.reportNonDisposed=true
    -Xms256m
    -Xmx2048m
    --add-modules=ALL-SYSTEM
    -Declipse.p2.max.threads=10
    -Doomph.update.url=http://download.eclipse.org/oomph/updates/milestone/latest
    -Doomph.redirection.index.redirection=index:/->http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/
    -Djava.class.path=C:\Users\u322384\eclipse\cpp-2021-03\eclipse\\plugins/org.eclipse.equinox.launcher_1.6.100.v20201223-0822.jar
    -os win32
    -ws win32
    -arch x86_64
    -showsplash C:\Users\u322384\.p2\pool\plugins\org.eclipse.epp.package.common_4.19.0.20210311-1200\splash.bmp
    -launcher C:\Users\u322384\eclipse\cpp-2021-03\eclipse\eclipse.exe
    -name Eclipse
    --launcher.library C:\Users\u322384\.p2\pool\plugins\org.eclipse.equinox.launcher.win32.win32.x86_64_1.2.100.v20210209-1541\eclipse_11301.dll
    -startup C:\Users\u322384\eclipse\cpp-2021-03\eclipse\\plugins/org.eclipse.equinox.launcher_1.6.100.v20201223-0822.jar
    --launcher.appendVmargs
    -product org.eclipse.epp.package.cpp.product
    -debug IndexerDebugOptions.txt
    -vm C:/Users/u322384/.p2/pool/plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_18.0.1.v20220515-1614/jre/bin\server\jvm.dll
    -vmargs
    -Dosgi.requiredJavaVersion=11
    -Dosgi.instance.area.default=@user.home/eclipse-workspace
    -Dsun.java.command=Eclipse
    -XX:+UseG1GC
    -XX:+UseStringDeduplication
    --add-modules=ALL-SYSTEM
    -Dosgi.requiredJavaVersion=11
    -Dosgi.dataAreaRequiresExplicitInit=true
    -Dorg.eclipse.swt.graphics.Resource.reportNonDisposed=true
    -Xms256m
    -Xmx2048m
    --add-modules=ALL-SYSTEM
    -Declipse.p2.max.threads=10
    -Doomph.update.url=http://download.eclipse.org/oomph/updates/milestone/latest
    -Doomph.redirection.index.redirection=index:/->http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/
    -Djava.class.path=C:\Users\u322384\eclipse\cpp-2021-03\eclipse\\plugins/org.eclipse.equinox.launcher_1.6.100.v20201223-0822.jar
    Install location:
        file:/c:/Users/u322384/eclipse/cpp-2021-03/eclipse/
    Configuration file:
        file:/c:/Users/u322384/eclipse/cpp-2021-03/eclipse/configuration/config.ini loaded
    Configuration location:
        file:/c:/Users/u322384/eclipse/cpp-2021-03/eclipse/configuration/
    Framework located:
        file:/C:/Users/u322384/.p2/pool/plugins/org.eclipse.osgi_3.16.200.v20210226-1447.jar
    Loading extension: reference:file:org.eclipse.osgi.compatibility.state_1.2.300.v20210212-1137.jar
            eclipse.properties not found
    Framework classpath:
        file:/C:/Users/u322384/.p2/pool/plugins/org.eclipse.osgi_3.16.200.v20210226-1447.jar
        file:/C:/Users/u322384/.p2/pool/plugins/
        file:/C:/Users/u322384/.p2/pool/plugins/org.eclipse.osgi.compatibility.state_1.2.300.v20210212-1137.jar
    Splash location:
        C:\Users\u322384\.p2\pool\plugins\org.eclipse.epp.package.common_4.19.0.20210311-1200\splash.bmp
    Debug options:
        file:/C:/Users/u322384/eclipse/cpp-2021-03/eclipse/IndexerDebugOptions.txt loaded
    Time to load bundles: 15
    Starting application: 1571
    FIRING POST_CHANGE Delta [Thread[main,6,main]]:
     CMODEL [*]: {CHILDREN | FINE GRAINED}
            testProject CPROJECT [*]: {CHILDREN | FINE GRAINED}
                    testProject SOURCE_ROOT [*]: {CHILDREN | FINE GRAINED}
                            main.cpp WORKING_UNIT [+]: {}
    Listener #1=org.eclipse.cdt.internal.core.model.PathEntryManager@5faa0c51 -> 1ms
    Listener #2=org.eclipse.cdt.internal.ui.navigator.CNavigatorContentProvider@77b6d94c -> 1ms
    FIRING POST_RECONCILE Delta [Thread[main,6,main]]:
    <NONE>
    [1,656,704,876,693] Parsed main.cpp: 80 ms. Ambiguity resolution: 35 ms
    CModelBuilder2: parsing main.cpp mode=skip all  time=280ms
    CModelBuilder2: building children=6 time=8ms
    FIRING POST_CHANGE Delta [Thread[org.eclipse.cdt.internal.ui.text.CReconciler,1,main]]:
    <NONE>
    FIRING POST_RECONCILE Delta [Thread[org.eclipse.cdt.internal.ui.text.CReconciler,1,main]]:
    main.cpp WORKING_UNIT [+]: {}
    Listener #1=org.eclipse.cdt.internal.core.model.PathEntryManager@5faa0c51 -> 0ms
    Listener #2=org.eclipse.cdt.internal.ui.navigator.CNavigatorContentProvider@77b6d94c -> 0ms
    Listener #3=org.eclipse.cdt.internal.ui.text.CReconciler$ElementChangedListener@6d4a5dc0 -> 0ms
    Listener #4=org.eclipse.cdt.internal.ui.editor.CContentOutlinerProvider$ElementChangedListener@7b019d2 -> 1ms
    Application started in : 12007ms
    SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
    SLF4J: Defaulting to no-operation (NOP) logger implementation
    SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
    Indexer: start TriggerNotificationTask
    Indexer: completed TriggerNotificationTask[2ms]
    [1,656,704,878,707] Parsed main.cpp: 267 ms. Ambiguity resolution: 23 ms
    CModelBuilder2: parsing main.cpp mode=skip all  time=303ms
    CModelBuilder2: building children=6 time=1ms
    FIRING POST_CHANGE Delta [Thread[org.eclipse.cdt.internal.ui.text.CReconciler,1,main]]:
    <NONE>
    FIRING POST_RECONCILE Delta [Thread[org.eclipse.cdt.internal.ui.text.CReconciler,1,main]]:
    main.cpp WORKING_UNIT [?]: {FINE GRAINED}
    Listener #1=org.eclipse.cdt.internal.core.model.PathEntryManager@5faa0c51 -> 0ms
    Listener #2=org.eclipse.cdt.internal.ui.navigator.CNavigatorContentProvider@77b6d94c -> 0ms
    Listener #3=org.eclipse.cdt.internal.ui.text.CReconciler$ElementChangedListener@6d4a5dc0 -> 0ms
    Listener #4=org.eclipse.cdt.internal.ui.editor.CContentOutlinerProvider$ElementChangedListener@7b019d2 -> 0ms
    Listener #5=org.eclipse.cdt.internal.core.index.provider.IndexProviderManager@ed36213 -> 0ms
    Listener #6=org.eclipse.cdt.internal.core.pdom.CModelListener@4ae4cb43 -> 0ms
    [1,656,704,890,896] Parsed main.cpp: 98 ms. Ambiguity resolution: 2 ms
    CModelBuilder2: parsing main.cpp mode=skip all  time=103ms
    CModelBuilder2: building children=6 time=1ms
    FIRING POST_CHANGE Delta [Thread[org.eclipse.cdt.internal.ui.text.CReconciler,1,main]]:
    <NONE>
    FIRING POST_RECONCILE Delta [Thread[org.eclipse.cdt.internal.ui.text.CReconciler,1,main]]:
    main.cpp WORKING_UNIT [?]: {FINE GRAINED}
    Listener #1=org.eclipse.cdt.internal.core.model.PathEntryManager@5faa0c51 -> 0ms
    Listener #2=org.eclipse.cdt.internal.ui.navigator.CNavigatorContentProvider@77b6d94c -> 0ms
    Listener #3=org.eclipse.cdt.internal.ui.text.CReconciler$ElementChangedListener@6d4a5dc0 -> 0ms
    Listener #4=org.eclipse.cdt.internal.ui.editor.CContentOutlinerProvider$ElementChangedListener@7b019d2 -> 0ms
    Listener #5=org.eclipse.cdt.internal.core.index.provider.IndexProviderManager@ed36213 -> 0ms
    Listener #6=org.eclipse.cdt.internal.core.pdom.CModelListener@4ae4cb43 -> 0ms
    FIRING POST_CHANGE Delta [Thread[main,6,main]]:
     CMODEL [*]: {CHILDREN | FINE GRAINED}
            testProject CPROJECT [*]: {CHILDREN | FINE GRAINED}
                    testProject SOURCE_ROOT [*]: {CHILDREN | FINE GRAINED}
                            main.cpp TRANSLATION_UNIT [*]: {CONTENT}
    Listener #1=org.eclipse.cdt.internal.core.model.PathEntryManager@5faa0c51 -> 0ms
    Listener #2=org.eclipse.cdt.internal.ui.navigator.CNavigatorContentProvider@77b6d94c -> 1ms
    Listener #3=org.eclipse.cdt.internal.ui.text.CReconciler$ElementChangedListener@6d4a5dc0 -> 0ms
    Listener #4=org.eclipse.cdt.internal.ui.editor.CContentOutlinerProvider$ElementChangedListener@7b019d2 -> 0ms
    Listener #5=org.eclipse.cdt.internal.core.index.provider.IndexProviderManager@ed36213 -> 0ms
    Listener #6=org.eclipse.cdt.internal.core.pdom.CModelListener@4ae4cb43Indexer: start PDOMFastIndexerTask
     -> 3ms
    FIRING POST_RECONCILE Delta [Thread[main,6,main]]:
    <NONE>
    C/C++ Indexer: Project 'testProject' (0 sources, 0 headers)
        Options: indexer='PDOMFastIndexer', parseAllFiles=true, unusedHeaders=useCPP, skipReferences=false, skipImplicitReferences=false, skipTypeReferences=false, skipMacroReferences=false.
        Database: 29224960 bytes
        Timings: 22 total, 0 parser, 0 resolution, 0 index update.
        Errors: 0 internal, 0 include, 0 scanner, 0 syntax errors.
        Names: 0 declarations, 0 references, 0(0.00%) unresolved.
        Cache[204MB]: 67 hits, 0(0.00%) misses.
    Indexer: completed PDOMFastIndexerTask[53ms]
    

  • Thank you for the extra logs. Let me follow up with engineering.

    Note that while standard Eclipse managed make projects can be used with CCS, we don't officially support it. Hence responses may be a bit delayed.

    Thanks

    ki

  • Hi Ki,

    I would like to note that this isn't just a Eclipse C++ project issue. Even in all of my CCS projects (TI MCU target, TI compiler, etc) on every save the indexer rebuilds in the background. I think the indexer doesn't hog as much resources in the C projects as they are relatively small compared to the C++ boost library. At least not to the point the IDE will slow down or freeze.

    Attached is the debug output with your new suggestions. Unfortunately this did not resolve the issue.

    Steps I took:

    1. Clean workspace by removing .metadata folder.
    2. Launch CCS with -clean and -debug
    3. Reimport project the clean workspace.
    4. Wait for initial indexer build to finish.
    5. Manually trigger indexer rebuild.
    6. Make minor code change and save.
    7. Observe index rebuild is triggered on its own still.

    ccsCleanDebugRebuild.txt