Joplin version: all versions past v1.0.179 (don't know about previous versions)
Platform: Linux
OS specifics: Artix Linux 64 bit
Both should delete notes at the same speed but Notebook delete is drastically slower.
Not home but can produce a log when i arrive.
Indeed I see that for "select all" it's calling batchDelete which deletes everything in one SQL command, while when deleting folders it's deleting notes one by one (and every time the UI has to update). I guess that should be an easy fix so I'm marking it as "good first issue".
@laurent22 @bedwardly-down I would like to work on this issue please assign it to me.
Thank you.
I am working on fixing this issue. ASAP.
Indeed I see that for "select all" it's calling
batchDeletewhich deletes everything in one SQL command, while when deleting folders it's deleting notes one by one (and every time the UI has to update). I guess that should be an easy fix so I'm marking it as "good first issue".
As you have said. I have found the code responsible for deleting folders and indeed it's deleting notes one by one instead of calling batch delete. I would like to fix this error.
Indeed I see that for "select all" it's calling
batchDeletewhich deletes everything in one SQL command, while when deleting folders it's deleting notes one by one (and every time the UI has to update). I guess that should be an easy fix so I'm marking it as "good first issue".As you have said. I have found the code responsible for deleting folders and indeed it's deleting notes one by one instead of calling batch delete. I would like to fix this error.
I was making changes to the file but when after saving i started the app using "npm start" the changes got reverted. What to do about that?
@Rahul-Shaikh what specific file are you changing? There are certain files that are deleted and recreated during the build process and you may be working with one of those.
@Rahul-Shaikh what specific file are you changing? There are certain files that are deleted and recreated during the build process and you may be working with one of those.
I was changing the Folder.js file. In that file in the delete function the noteIds are taken and being deleted by the use of a for loop. Changing that to a batchDelete function with the Ids will probably fix the problem i suppose.
I'm assuming ElectronClient/lib/models/Folder.js, right? I'm asking because that folder doesn't exist until the build script is ran. It's a copy of ReactNativeClient/lib/models and is deleted upon rebuilds. Making any changes there affects Mobile and Desktop.
@laurent22, @bedwardly-down I think this should fix this issue
I'm assuming
ElectronClient/lib/models/Folder.js, right? I'm asking because that folder doesn't exist until the build script is ran. It's a copy ofReactNativeClient/lib/modelsand is deleted upon rebuilds. Making any changes there affects Mobile and Desktop.
yes that is the file. Understood so changes had to be done there.
@laurent22, @bedwardly-down I think this should fix this issue
This is the exact thing i had done in the ElectronClient but due to build always reverting. Not issuing a PR then
Most helpful comment
Indeed I see that for "select all" it's calling
batchDeletewhich deletes everything in one SQL command, while when deleting folders it's deleting notes one by one (and every time the UI has to update). I guess that should be an easy fix so I'm marking it as "good first issue".