[
https://issues.apache.org/jira/browse/TS-2501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13883442#comment-13883442
]
ASF subversion and git services commented on TS-2501:
-----------------------------------------------------
Commit e8f18ea04e074670ba6c4d98c00edffd0d2d4a68 in branch refs/heads/master
from [~zwoop]
[ https://git-wip-us.apache.org/repos/asf?p=trafficserver.git;h=e8f18ea ]
TS-2501 Refactor and improve performance for the case without expansions
> VariableExpander in header_rewrite is unnecessary expensive
> -----------------------------------------------------------
>
> Key: TS-2501
> URL: https://issues.apache.org/jira/browse/TS-2501
> Project: Traffic Server
> Issue Type: Bug
> Components: Plugins
> Reporter: Leif Hedstrom
> Assignee: Leif Hedstrom
> Fix For: 4.2.0
>
> Attachments: TS-2501.diff
>
>
> It seems that VariableExpander gets instantiated and executed on every
> add-header operator. However, this seems rather suboptimal for a number of
> reasons:
> 1. It might not even be necessary (i.e. there might not be any %<> strings in
> the "static" string.
> 2. Perhaps even more important, we look for these strings on every request,
> even though if they are there, they would always be in the same position on
> every request.
> One suggestion would be to incorporate the VariableExpander "state" as part
> of parsing the configuration on startup / reload. Maybe it gets complicated
> when there are other expansions, but it still feels we can pre-parse these
> strings and get some ideas of what needs to be expanded once, and not on
> every request.
> This is similar to how e.g. the regex_remap plugin works, it recalculates the
> positions and expansion once only.
> Thoughts?
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)