Skip to content

Conversation

@bneradt
Copy link
Contributor

@bneradt bneradt commented Aug 10, 2023

cache_range_requests_cache_complete_responses.test.py had a for loop where it appended a single character to a string 4 million times. This is exceedingly slow in Python as it needed to reallocate, copy, and append with each iteration. This patched version reduces the time to a fraction of a second instead of multiple minutes (4 minutes on my system).

cache_range_requests_cache_complete_responses.test.py had a for loop
where it appended a single character to a string 4 million times. This
is exceedingly slow in Python as it needed to reallocate, copy, and
append with each iteration. This patched version reduces the time to a
fraction of a second instead of multiple minutes (4 minutes on my
system).
@bneradt bneradt added the AuTest label Aug 10, 2023
@bneradt bneradt added this to the 10.0.0 milestone Aug 10, 2023
@bneradt bneradt self-assigned this Aug 10, 2023
@bneradt
Copy link
Contributor Author

bneradt commented Aug 10, 2023

Marking for 9.2.x since this test performance improvement will be nice for that branch too.

@bneradt bneradt merged commit 68f1263 into apache:master Aug 11, 2023
@bneradt bneradt deleted the cache_range_requests_cache_complete_responses_perf_improvement branch August 11, 2023 02:45
zwoop pushed a commit that referenced this pull request Aug 14, 2023
cache_range_requests_cache_complete_responses.test.py had a for loop
where it appended a single character to a string 4 million times. This
is exceedingly slow in Python as it needed to reallocate, copy, and
append with each iteration. This patched version reduces the time to a
fraction of a second instead of multiple minutes (4 minutes on my
system).

(cherry picked from commit 68f1263)
@zwoop
Copy link
Contributor

zwoop commented Aug 14, 2023

Cherry-picked to v9.2.x

@zwoop zwoop modified the milestones: 10.0.0, 9.2.3 Aug 14, 2023
cmcfarlen pushed a commit to cmcfarlen/trafficserver that referenced this pull request Jun 3, 2024
* asf/master: (221 commits)
  LSan: Fix leak of test_Metrics (apache#10179)
  LSan: Fix memory leak of test_EventSystem (apache#10178)
  LSan: Fix memory leak of test_X509HostnameValidator (apache#10161)
  Remove cqtx log field (apache#10111)
  Require ATS plugins to be compiled with C++17. (apache#10007)
  Fix conf_remap plugin build on macOS (apache#10177)
  libswoc: Update to 1.5.4 (apache#10155)
  Makes cmake build again, on macOS (apache#10172)
  Check SNI in h3 (apache#10184)
  Remove autoconf headers during CMake configuration (apache#10173)
  test_QUICLossDetector.cc: Add back get_hrtime() (apache#10185)
  ink_ink_get_hrtime -> ink_get_hrtime (apache#10182)
  mgmt: make libconfigmanager a true static library (apache#10181)
  Make sure that the thread local time is updated timely (apache#10163)
  Unrequire remap rules for OCSP (apache#10146)
  cache_range test performance improvement (apache#10170)
  Clean up certifier plugin debug messages. (apache#9975)
  cmake: add check for clock_gettime (apache#10169)
  Remove Http3NoError allocations (apache#10165)
  Fix Throttler initialization. (apache#10154)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants