Skip to content

Conversation

@bneradt
Copy link
Contributor

@bneradt bneradt commented Aug 9, 2023

The Http3Error mechanism is written around dynamic polymorphism, with Http3Error as the base class and a few child classes for specifc types of errors. One of those was Http3NoError. It was observed that the frequent allocations for Http3NoError in many places was wasteful, so this patch removes those allocations by instead returning nullptr instead and removes the Http3NoError class since it is no longer used.

Fixes #9992

@bneradt bneradt added the HTTP/3 label Aug 9, 2023
@bneradt bneradt added this to the 10.0.0 milestone Aug 9, 2023
@bneradt bneradt self-assigned this Aug 9, 2023
@bneradt bneradt requested a review from maskit August 9, 2023 17:43
@bneradt bneradt force-pushed the remove_Http3NoError_allocations branch from af66633 to 76f5dc0 Compare August 9, 2023 18:31
The Http3Error mechanism is written around dynamic polymorphism, with
Http3Error as the base class and a few child classes for specifc types
of errors. One of those was Http3NoError. It was observed that the
frequent allocations for Http3NoError in many places was wasteful, so
this patch removes those allocations by instead returning nullptr
instead and removes the Http3NoError class since it is no longer used.

Fixes apache#9992
@bneradt bneradt force-pushed the remove_Http3NoError_allocations branch from 76f5dc0 to bc9fde9 Compare August 9, 2023 18:34
@bneradt bneradt merged commit 3b31f67 into apache:master Aug 10, 2023
@bneradt bneradt deleted the remove_Http3NoError_allocations branch August 10, 2023 16:11
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.

Don't allocate Http3NoError

2 participants