Optimize Plack::Request->query_parameters #384

Merged
merged 2 commits into from Mar 8, 2013

Projects

None yet

2 participants

@lestrrat
Contributor
lestrrat commented Mar 6, 2013
  • Old code used build an URI object (twice!), but for query parameter
    parsing, this is unnecessary
  • Stole code from URI::_query, directly created Hash::MultiValue
  • While we're at it, short-circuit the method by checking for cached
    instance before doing any parsing
  • This patch should make query parameter parsing about 5~10 times faster
lestrrat added some commits Mar 6, 2013
@lestrrat lestrrat Optimize ->query_parameters
* Old code used build an URI object (twice!), but for query parameter
  parsing, this is unnecessary
* Stole code from URI::_query, directly created Hash::MultiValue
* While we're at it, short-circuit the method by checking for cached
  instance before doing any parsing
* This patch should make query parameter parsing about 5~10 times faster
f365a0d
@lestrrat lestrrat remove unnecessary ||= and replace with = 5c89616
@miyagawa miyagawa added a commit that referenced this pull request Mar 8, 2013
@miyagawa miyagawa Merge #384 a31f876
@miyagawa miyagawa added a commit that referenced this pull request Mar 8, 2013
@miyagawa miyagawa Cleanup request query caching #384 5413ff1
@miyagawa miyagawa merged commit 5c89616 into plack:master Mar 8, 2013
@miyagawa
Member
miyagawa commented Mar 8, 2013

Cleaned up in 5413ff1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment