zwoop commented on code in PR #9480:
URL: https://github.com/apache/trafficserver/pull/9480#discussion_r1122120879
##########
proxy/InkAPIInternal.h:
##########
@@ -207,10 +207,14 @@ template <typename ID, int N>
void
FeatureAPIHooks<ID, N>::clear()
{
- for (auto &h : m_hooks) {
- h.clear();
+ if (m_hooks_p) {
+ for (auto &h : m_hooks) {
+ if (!h.is_empty()) {
Review Comment:
Part of the "problem" is that APIHOoks as we did it can not be inlined, so
it calls it 28 times for no good reason :/
--
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]