Skip to content

[BUG] Performance Issues Caused by Folding in Large Files #16064

@softmgr

Description

@softmgr

Is there an existing issue for this?

  • I have searched the existing issues

Description of the Issue

When working with large files with syntax highlighting enabled, if there are a large number of lines, the editor often becomes unresponsive during folding and unfolding operations.

To address this issue, I have optimized the Notepad++ code based on the latest master branch as of today.
A total of 7 files were modified:
ScintillaEditView.h
ScintillaEditView.cpp
Notepad_plus.cpp
NppCommands.cpp
FindReplaceDlg.cpp
documentMap.h
documentMap.cpp

@donho You can download the complete modified code here:
notepad-plus-plus-master[20250114].zip

Steps To Reproduce

  1. Open a large file with syntax highlighting enabled.
  2. Perform folding and unfolding operations.
  3. After folding, switch between tabs.

Current Behavior

The editor becomes unresponsive for a long time.

Expected Behavior

Let’s reduce the editor’s response time.

Debug Information

Notepad++ v8.7.5   (64-bit)
Build time : Dec 21 2024 - 05:13:03
Path : C:\Program Files\Notepad++\notepad++.exe
Command Line : 
Admin mode : OFF
Local Conf mode : OFF
Cloud Config : OFF
Periodic Backup : ON
Placeholders : OFF
DirectWrite : ON
Multi-instance Mode : monoInst
File Status Auto-Detection : cdEnabledNew (for current file/tab only)
Dark Mode : OFF
OS Name : Windows 11 Pro (64-bit)
OS Version : 24H2
OS Build : 26100.2605
Current ANSI codepage : 1252
Plugins : 
    mimeTools (3.1)

Anything else?

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions