Add a timestamp prescreen to update-from-model for better efficiency#17301
Add a timestamp prescreen to update-from-model for better efficiency#17301donho merged 2 commits intonotepad-plus-plus:masterfrom
Conversation
I implemented @vlakoff's flow (notepad-plus-plus@c64b81e#commitcomment-172711882) based on @donho's statement (notepad-plus-plus@c64b81e#commitcomment-172721328)
donho
left a comment
There was a problem hiding this comment.
the modif timestamp should be read in "updateFromModelXml", but before calling it, as my comment shown:
c64b81e#commitcomment-172744627
|
Please follow the suggestion, and add the new commit into #17298. |
I don't understand why. And I have two reasons that I thought were pretty good for putting the check where I did: First, That would mean I would have to have separate (duplicate/repeated) code in both Second, I would also have to then pass in the modif timestamp into the |
|
Hmm... You're right about it. |
PowerEditor/src/Parameters.cpp
Outdated
| std::wstring ws_modelModifTimestamp = std::to_wstring(modifyTime); | ||
|
|
||
| // if both strings exist, do the string comparison, and don't bother reading the model unless the user attribute appears out-of-date | ||
| if (!ws_user_modelModifTimestamp.empty() and !ws_modelModifTimestamp.empty()) |
There was a problem hiding this comment.
- Always use
&&instead ofand !ws_modelModifTimestamp.empty()will be always true - it can be removed.
…h launch Ref: c64b81e#commitcomment-172711882 Fix #17290, close #17301
I implemented @vlakoff's flow (c64b81e#commitcomment-172711882) based on @donho's statement (c64b81e#commitcomment-172721328)
resolves #17290