Ben Adams

Results 149 comments of Ben Adams

Fortunes allocations before ![image](https://user-images.githubusercontent.com/1142958/104820301-c234a480-582b-11eb-8f6f-8c53ff9ec4fa.png) Fortunes allocations after ![image](https://user-images.githubusercontent.com/1142958/104820355-235c7800-582c-11eb-8675-ef26d200c893.png) Still have to check throughput etc

> BTW, any idea if this is done on the web side, e.g. for parsing HTTP headers etc.? Kestrel already does it for the "known" set of headers; if they...

Referencing https://github.com/benaadams/npgsql/pull/1#issuecomment-761879026 @roji am good if you want to branch this as it is now so @sebastienros can get a package from MyGet for throughput testing

Now drops all the `string`, `char[]`, `StringBuilder` and `Dictionary` allocations; or 181MB per 100k requests for Fortunes Before ![image](https://user-images.githubusercontent.com/1142958/104858097-c4bef900-5914-11eb-9bb6-6bb779d6ba0c.png) After ![image](https://user-images.githubusercontent.com/1142958/104858118-e91ad580-5914-11eb-816c-e834bb59f3e3.png)

i.e. Reduces memory allocation by > 1/3rd ![image](https://user-images.githubusercontent.com/1142958/104858698-ffc32b80-5918-11eb-94e5-f0a8475cecca.png)

> Therefore, there's a very little chance that they would be equal. It's a process wide cache rather than per query; so it also depends whether the results will occur...

Looks like need to work on the contention upstream...

`OperationCanceledException` in `MultiplexingWriteLoop` are the ones I was seeing in benchmarking

> It could still be a good idea to optimize this, though I'd keep that part separate - ideally a separate PR to not confuse the perf gains. Opened https://github.com/npgsql/npgsql/pull/3470...

I'd like a typescript lib project; happy to then build the output js and map files into the scripts folder of my other projects that use it. Typescript Node project...