pomerium/internal
Joe Kralicky 18cb47421a
Optimize Policy RouteID and Checksum
This significantly optimizes the (*Policy).RouteID() and
(*Policy).Checksum() methods for both speed and memory usage.

A new method (*Policy).ChecksumWithID(uint64) can be used to skip a call
to RouteID() if the ID is already known. Checksum() is implemented in
terms of this new method, and will always recompute the route ID on each
call.

RouteID() does not allocate heap memory. Checksum() may allocate heap memory,
depending on which fields are set. If all of the following are true,
Checksum() makes zero allocations:
1. The policy uses redirect or direct-response mode
2. The policy has no sub-policies
3. The policy has no response header rewrite config
2024-11-05 15:59:39 -05:00
..
atomicutil atomicutil: use atomicutil.Value wherever possible (#3517) 2022-07-28 15:38:38 -06:00
authenticateflow Fix many instances of contexts and loggers not being propagated (#5340) 2024-10-25 14:50:56 -04:00
autocert New integration test fixtures (#5233) 2024-11-05 14:31:40 -05:00
benchmarks New integration test fixtures (#5233) 2024-11-05 14:31:40 -05:00
chanutil fileutil: update watcher to use fsnotify and polling (#3663) 2022-10-19 09:13:08 -06:00
contextkeys xds: only tag contexts used for UpdateRecords (#2269) 2021-06-04 14:01:25 -04:00
controlplane New integration test fixtures (#5233) 2024-11-05 14:31:40 -05:00
databroker tests: use testcontainers (#5341) 2024-10-30 13:33:30 -06:00
deterministicecdsa core/ci: update linting (#4844) 2023-12-14 09:07:54 -08:00
enabler Fix many instances of contexts and loggers not being propagated (#5340) 2024-10-25 14:50:56 -04:00
encoding core/lint: upgrade golangci-lint, replace interface{} with any (#5099) 2024-05-02 14:33:52 -06:00
errgrouputil core/go: use max procs (#4766) 2023-12-07 09:14:57 -07:00
events core/logging: change log.Error function (#5251) 2024-09-05 15:42:46 -06:00
fileutil Fix many instances of contexts and loggers not being propagated (#5340) 2024-10-25 14:50:56 -04:00
handlers Add an 'issuer' field to the /.well-known/pomerium endpoint (#5344) 2024-10-25 13:07:57 -04:00
hashutil Optimize Policy RouteID and Checksum 2024-11-05 15:59:39 -05:00
httputil logging: remove ctx from global log methods (#5337) 2024-10-23 14:18:52 -06:00
log New integration test fixtures (#5233) 2024-11-05 14:31:40 -05:00
middleware core/logging: change log.Error function (#5251) 2024-09-05 15:42:46 -06:00
registry logging: remove ctx from global log methods (#5337) 2024-10-23 14:18:52 -06:00
retry Fix many instances of contexts and loggers not being propagated (#5340) 2024-10-25 14:50:56 -04:00
scheduler feature/databroker: user data and session refactor project (#926) 2020-06-19 07:52:44 -06:00
sessions Update to Go 1.23 (#5216) 2024-08-14 14:12:01 -04:00
sets core/go: use hashicorp/go-set (#5278) 2024-10-03 12:59:11 -06:00
signal log context (#2107) 2021-04-22 10:58:13 -04:00
syncutil config: generate cookie secret if not set in all-in-one mode (#3742) 2022-11-11 14:14:30 -07:00
telemetry logging: remove ctx from global log methods (#5337) 2024-10-23 14:18:52 -06:00
testenv New integration test fixtures (#5233) 2024-11-05 14:31:40 -05:00
tests/xdserr Fix many instances of contexts and loggers not being propagated (#5340) 2024-10-25 14:50:56 -04:00
testutil tests: use testcontainers (#5341) 2024-10-30 13:33:30 -06:00
tripper config: remove source, remove deadcode, fix linting issues (#4118) 2023-04-21 17:25:11 -06:00
urlutil core/lint: upgrade golangci-lint, replace interface{} with any (#5099) 2024-05-02 14:33:52 -06:00
version ci: do not include timestamp into buildmeta (#5215) 2024-08-15 10:57:10 -04:00
zero Fix many instances of contexts and loggers not being propagated (#5340) 2024-10-25 14:50:56 -04:00