1 of 1 people found this helpful
Hey Peter -
When a custom view is created, you're actually saving a diff of the viz as a BLOB (representing changes the user made) into the Server - so you're doing a lot of unnecessary work on the "server side" to get from A to B - not optimal.
I understand why you'd go down this route...it's nice and straight forward. However, I think you'll see much better performance if you lean on the JSAPI events to track user changes to filters/parameters and store them in an multi-dimensional array that can be re-applied at will.
This won't allow you to track changes to SORTING, but it'll be much faster.
Hope this helps a little.
To be honest I tried that approach initially and dropped it in favor of the rememberCustomViewAsync. That approach seemed much simpler.
I was running into problems with the tracking of filters as it stored all filters on change rather than updated ones, and repeated the process for each worksheet unnecessarily.I ended up putting a setTimeout to intercept the repeats and run only once.
It would be good if there was a getState() and setState method that allowed me to fetch a current Viz's state and set it again later.
I'll go back to the parameter & filter change approach and report back here when I have something working with good performance.