Avoid loading wiki page content for certain actions
Once !71753 (merged) is merged, we can leverage it to avoid loading the wiki page content in actions where we don't really need it. These actions would be the destroy
and diff
ones.
The changes would be basically:
diff --git a/app/controllers/concerns/wiki_actions.rb b/app/controllers/concerns/wiki_actions.rb
index dc540f67974..40a12ab0d65 100644
--- a/app/controllers/concerns/wiki_actions.rb
+++ b/app/controllers/concerns/wiki_actions.rb
@@ -312,7 +312,7 @@ def send_wiki_file_blob(wiki, file_blob)
end
def load_content?
- return false if params[:action] == 'history'
+ return false if %w[history destroy diff].include?(params[:action])
!(params[:action] == 'show' && Feature.enabled?(:wiki_async_load, container, default_enabled: :yaml))
end
When we implement this we'll be able to perform these actions really quick, especially when the wiki page content is big.