When opening an .html file with a large amount of embedded SVG code or a file with more than 100,000 lines (132,986,669 characters in my case), Cursor stops loading associations and metadata for other files. Within 3-5 minutes, the system becomes unresponsive, as Cursor attempts to analyze the file. This issue also occurs with large SVG files when using code visualization.
Why Should There Be a Limit?
In my workflow, I often use the WE Page Copy Chrome extension to save an entire webpage as a single file. I then embed scripts (React / Angular) for quick modifications and real-time previews without needing to reload. Since hot reloading only works with JSX/TSX templates in React, I sometimes only need to change a couple of characters (e.g., data-filter=“1” → data-filter=“2”) to test different templates.
However, due to this issue, I have to switch to another IDE (like Zed) just to make minor edits, which is highly inconvenient.
Suggested Fix
Please implement a file size limit for analysis. If a file is too large, show a warning message like:
“This file is too large. If you want AI to analyze it, be prepared to wait a long time. To override this behavior, modify config.json.”
I actually can relate to this, I frequently have to edit an SVG file which contains inline base64 encoded image data. I have Zed set up as my dedicated editor for SVG files since it’s the only editor performant enough to handle large files of this type without breaking a sweat. So I see this not so much as a Cursor thing but an editor thing. That being said … I definitely have to tell .cursorignore to ignore large SVG files.
In my workflow, I often use the WE Page Copy Chrome extension to save an entire webpage as a single file. I then embed scripts (React / Angular ) for quick modifications and real-time previews without needing to reload. Since hot reloading only works with JSX/TSX templates in React, I sometimes only need to change a couple of characters (e.g., data-filter=“1” → data-filter=“2”) to test different templates.