[Workbench] Avoid passing manifest_text around the network too much when updating and merging large collections.
- Workbench should not send manifest_text to API in an update() request when only name/description is being changed (this should be easy enough to achieve in Workbench)
- Cases where the content is being modified probably depend on #5104
- Follow up all related bugs to find out whether this fixes them.
- Close the ones that are fixed.
- Move the rest to bug triage, to find out what's still wrong.
#5 Updated by Brett Smith over 6 years ago
When we're doing small updates, the new update method skips a lot of the encoding work in the ApplicationController's implementation, and then repeats a lot of the rendering code. I think we could help future-proof this by repeating as little as possible, and calling super as early as possible. I think you could do it like this:
def update @updates ||= params[@object.resource_param_name.to_sym] if @updates && (@updates.keys - ["name", "description"]).empty? # exclude manifest_text since only name or description is being updated @object.manifest_text = nil end super end
Let me know what you think of that. Thanks.