Skip to content

yet another but smaller clone PR on dynamic props

Created by: MartinHN

Hi again, great improvements! thanks!

  • I only needed to add recursivity in checking and applying dynamic properties changes in clone, and BAM! the performance hit I from my last controversial clone PR is back without changing to core API!

  • a second change is to avoid clone rebuild on widget-created event (the comment on the function already tells that) : without that, if 2 clones are targeting the same widgetId, the first clone will be rebuilt on the creation of the second, and will changes it's target to point to the clone and not the original one...

let me know and don't hesitate to tell if I'm too stubborn !

and please do change the code if you feel it, I only wanted to have this functionality back, but as you may have seen I'm not originally a Js coder, so I may miss some js design skills..

to explain a bit why I'm that stubborn, I can't stand the fact that a clones widget constructor gets called only if some of it's target child is moved, I find it so sad, even more considering that we already have a nice way to handle dynamic props change!

also if you use any specific linter, tell me, I could ensure my PRs are nicely formatted.

detail on performances time for my use case (update 31 clone on moving a child in original target) :

  • initially : infinite in some cases
  • your last changes : ~ 1.5s
  • this PR : almost instantaneous

Merge request reports