Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove non-bookmarked lines feature loops itself badly #14288

Closed
Dum4G opened this issue Oct 28, 2023 · 6 comments
Closed

Remove non-bookmarked lines feature loops itself badly #14288

Dum4G opened this issue Oct 28, 2023 · 6 comments
Labels
scintilla dependent Can't be considered for N++ implementation unless/until Scintilla changes

Comments

@Dum4G
Copy link

Dum4G commented Oct 28, 2023

Description of the Issue

If you try this feature on a large file you will see an expanentional growth in RAM consumption, at some point it will fail and do nothing but keep hogging your memory

Steps to Reproduce the Issue

  1. Download http://5.9.147.111/epg/epg_1.xml.gz
  2. Set your Mark querry as follows
    image
  3. Mark dem all
  4. Choose "Remove Non-Bookmarked Lines"
  5. Enjoy the turmoil
    image

Expected Behavior

  1. To save all marked lines in memory (copying and cutting them works just fine)
  2. To clean every line
  3. To paste querried lines from memory
  4. RAM gets cleaned from remnants of the task

Actual Behavior

Either some unnecessary loop or huge memory leak happens. Even after it fails ands gets responsive again memory is being hogged until you close Notepad++

Debug Information

Notepad++ v8.5.8 (64-bit)
Build time : Oct 15 2023 - 21:43:56
Path : C:\Program Files\Notepad++\notepad++.exe
Command Line :
Admin mode : OFF
Local Conf mode : OFF
Cloud Config : OFF
OS Name : Windows 10 Pro (64-bit)
OS Version : 21H1
OS Build : 19043.1526
Current ANSI codepage : 1251
Plugins :
ComparePlugin (2.0.2)
CSVLint (0.4.6.5)
mimeTools (2.9)
NppConverter (4.5)
NppExport (0.4)

@xomx
Copy link
Contributor

xomx commented Oct 29, 2023

Duplicate of #14188 & #13442 .
Workaround: #13442 (comment)

@Dum4G Dum4G closed this as not planned Won't fix, can't repro, duplicate, stale Oct 29, 2023
@donho donho reopened this Nov 7, 2023
@donho donho closed this as completed in 69998ab Nov 7, 2023
@Dum4G
Copy link
Author

Dum4G commented Nov 7, 2023

Can someone tell me what's the essential usecase of Display change history? maybe there's some vibe going around having this feature the way it works now? Repeated my test with exactly the same file under the same circumstances with an artifact from 69998ab:
it took
29 (!) minutes of time
additional 1.5gb of RAM to acomplish the task.
16% of i7 6700k processing time which is still far from potatoest CPUs that available.

Even funnier to watch how it's going to take the same amount of time to undo the change that was supposed to happen as a single action. Isn't it effective to just keep in memory previous version as is or compile a diff? I'm even more amused to see it hanging to undo the change now.

UPD2: More than 30 minutes passed, still waiting for Ctrl+Z to take effect)))
UPD3: 1h passed I'm about to give up waiting

@chcg chcg added the scintilla dependent Can't be considered for N++ implementation unless/until Scintilla changes label Nov 7, 2023
@donho
Copy link
Member

donho commented Nov 8, 2023

@Dum4G
I tested with the file & the instructions you provided. Here are the results:

  • 13 minutes on build with 69998ab (my local build x64 release mode), all non-marked lines are removed.
  • ~20 minutes on v8.5.8 official release (x64 release mode), some non-marked lines are removed (total lines before the operation: 5637429, remained lines after operation: 5535091)

@Dum4G
Copy link
Author

Dum4G commented Nov 8, 2023

@donho but shouldn't that happen in a blink of an eye? I can't imagine someone deciding to be like: I removed 5535091 lines out of 5637429, now i expect to return to an intermediate state where it was 234665 lines left. Speaking of having a history, I went to sleep and did not wait for the process to undo the change to happen, I'm not even dramatizing

@Dum4G
Copy link
Author

Dum4G commented Nov 8, 2023

I just realized it acts the same even with Display history being disabled

@Dum4G
Copy link
Author

Dum4G commented Nov 11, 2023

@donho Is there a chance that the feature behaviour would be reconsidered or some fast and intuitive option would be provided? As of now I don't think we've got a proper fix for the issue IMO

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scintilla dependent Can't be considered for N++ implementation unless/until Scintilla changes
Projects
None yet
Development

No branches or pull requests

4 participants