Skip to content
This repository has been archived by the owner on May 3, 2022. It is now read-only.

Intern timeout error strings #128

Open
kriskowal opened this issue Oct 24, 2015 · 0 comments
Open

Intern timeout error strings #128

kriskowal opened this issue Oct 24, 2015 · 0 comments

Comments

@kriskowal
Copy link
Contributor

A production heap snapshot revealed that 47% of an aberrant process’s memory was consumed by strings, mostly timeout exception strings (long paths redacted):

TchannelRequestTimeoutError: request timed out after 101ms (limit was 100ms)
 at Object.createError [as RequestTimeoutError] (hyperbahn/node_modules/tchannel/node_modules/error/typed.js:31:22)
 at LazyRelayOutReq.onTimeout hyperbahn/node_modules/tchannel/relay_handler.js:601:27)
 at TimeHeap.callExpiredTimeouts (hyperbahn/node_modules/tchannel/time_heap.js:186:14)
 at TimeHeap.drainExpired (hyperbahn/node_modules/tchannel/time_heap.js:175:14)
 at TimeHeap.update (hyperbahn/node_modules/tchannel/time_heap.js:116:10)
 at Operations.addInReq (hyperbahn/node_modules/tchannel/operations.js

Let’s reduce the weight of these strings by removing the stack trace and memoizing/interning strings for combinations snapped to 10ms.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant