nic-6443 commented on code in PR #13345:
URL: https://github.com/apache/apisix/pull/13345#discussion_r3212612774


##########
apisix/init.lua:
##########
@@ -850,6 +853,7 @@ function _M.http_access_phase()
                 plugin.run_plugin(phase, api_ctx.plugins, api_ctx)
             end
         end
+        plugin.run_global_rules(api_ctx, global_rules, conf_version, "access")
         plugin.run_plugin("access", plugins, api_ctx)

Review Comment:
   The expensive part (merging global rules) is already LRU-cached. The 
`filter()` call is lightweight — it just iterates through plugins and builds a 
priority-sorted list. The overhead of calling it twice is negligible compared 
to the actual plugin execution. Adding a cache for the filtered list would 
introduce complexity (cache invalidation on plugin changes) without meaningful 
perf benefit.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to