# When I use Add Folder to Workspace, codebase indexing is triggered repeatedly

**URL:** <https://forum.cursor.com/t/when-i-use-add-folder-to-workspace-codebase-indexing-is-triggered-repeatedly/77053>\
**Category:** Bug Reports\
**Created:** [April 9, 2025, 8:44am UTC](https://forum.cursor.com/t/when-i-use-add-folder-to-workspace-codebase-indexing-is-triggered-repeatedly/77053 "2025-04-09T08:44:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![isCopyman](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/iscopyman/32/12285_2.png) [@isCopyman](https://forum.cursor.com/u/isCopyman)\
**Post date:** [April 9, 2025, 8:44am UTC](https://forum.cursor.com/t/when-i-use-add-folder-to-workspace-codebase-indexing-is-triggered-repeatedly/77053/1 "2025-04-09T08:44:11Z")

</div>

Let’s assume my project structure is as follows:

```auto
root/
root/fold1/
root/fold1/■■■/fold1_1/
root/fold1/■■■/fold1_2/

```

Because fold1 contains useful memory.md files that guide the work within fold1\_1, I need to keep fold1 accessible in my workspace, rather than just opening fold1\_1 directly. Additionally, I need to primarily focus my work within fold1\_1 (which represents a specific experiment folder).

To achieve this, I have set up a VS Code multi-root workspace where I’ve added both fold1 and fold1\_1 as separate root folders.

The problem is that now, the codebase indexing feature indexes the contents of fold1\_1 twice: once as a subdirectory scanned under the fold1 root, and again as its own separate fold1\_1 root added to the workspace. This duplicate indexing is causing a severe performance loss.

---

<div class="post-metadata">

**Author:** ![isCopyman](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/iscopyman/32/12285_2.png) [@isCopyman](https://forum.cursor.com/u/isCopyman)\
**Post date:** [April 9, 2025, 9:03am UTC](https://forum.cursor.com/t/when-i-use-add-folder-to-workspace-codebase-indexing-is-triggered-repeatedly/77053/2 "2025-04-09T09:03:31Z")

</div>

Codebase indexing should first verify deduplication of file paths and then perform indexing.

---

<div class="post-metadata">

**Author:** ![isCopyman](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/iscopyman/32/12285_2.png) [@isCopyman](https://forum.cursor.com/u/isCopyman)\
**Post date:** [April 9, 2025, 9:18am UTC](https://forum.cursor.com/t/when-i-use-add-folder-to-workspace-codebase-indexing-is-triggered-repeatedly/77053/3 "2025-04-09T09:18:50Z")

</div>

If you index root first and then add fold1\_1 to the working area, the indexing will be very fast and will not trigger duplicate indexing. After fold1\_1 is added to the working area, if you delete the index and perform indexing again, the indexing will be very slow at this time.

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/system/32/99069_2.png) [@system](https://forum.cursor.com/u/system)\
**Post date:** [May 9, 2025, 9:18am UTC](https://forum.cursor.com/t/when-i-use-add-folder-to-workspace-codebase-indexing-is-triggered-repeatedly/77053/4 "2025-05-09T09:18:52Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
