-
Notifications
You must be signed in to change notification settings - Fork 12
Optimized diff()
function which now uses fastDiff()
function internally for large data sets
#274
Conversation
I was thinking about adding some performance unit tests which checks how long setting data (with The problem with such tests is that exec time may vary (same test from 100 to 400 ms between runs in different browsers, or even 400 to 1100 ms) so I'm not sure if it makes sense as such tests are not very stable and the exec time depends on the environment they are run in. WDYT @Reinmar? Anyway, these tests can be added separately (especially that they should be added to core IMHO) so this PR is ready for review. |
In general, 👍 .
Definitely to the core.
I assume we changed results from a scenario with e.g. 1000 nodes from 10s to 100ms, am I right? So it's easy to write a threshold value – anything below e.g. 1s will be fine. Such a test should be really stable. However, tests should be fast. So ideally I'd love a test which always passes in <100ms. Is there such a node count which would generate such results now and before would fail? |
Actually... to the engine. The bug was in the engine. |
Yes and no :D Previously which means end to end tests for larger data sets still takes up to few seconds to be completed. Maybe we could test only some part of the pipeline (e.g. |
Steps to reproduce
Current resultThe editor crashes. Error
GIF |
It's understandable and acceptable (at this stage) when loading a bigger blob of data takes that much time. We should be focused on the part which took the majority of that time and that's
I don't understand. Can't we use a data set of a size which will give now results <100ms and would take 10s before? The point of an e2e test is to make sure the problem's never back. That it doesn't appear in some other place. The problem was that for a data set of a reasonable size the |
Now I can't reproduce it. Interesting, it would be nice if you could take a look at it 🤔 |
I suppose it could be this. Now it works fine for me. |
What I meant earlier is that for data which took around 10s before, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haven't found any issue.
I have added rendering performance tests in ckeditor/ckeditor5-engine#1676. |
Suggested merge commit message (convention)
Other: Optimized
diff()
function which now usesfastDiff()
function internally for large data sets. Closes ckeditor/ckeditor5#5013.Additional information
See ckeditor/ckeditor5#5013.