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

>?= (Pipeline.compose) on freya<PipelineChoice> and freyaRouter causes significant delay in every request #205

Open
et1975 opened this issue Oct 30, 2018 · 1 comment

Comments

@et1975
Copy link

et1975 commented Oct 30, 2018

Essentially doing this: https://blog.mavnn.co.uk/logging-freya/
and finding that adding the composition affects every request - it takes a significant CPU hit (response time going from ~20ms to ~300ms). Tests indicate that it's something in the composition itself, as injecting the value into the freya state takes no time at all.

Sample code:

let owin : OwinMidFunc = 
        OwinMidFunc.ofFreya (Polyfill.kestrel
                                    >?= withLogger "log"
                                    >?= apiPipeline)
app.UseOwin(fun p -> p.Invoke owin)

Wondering if I'm doing it wrong, or maybe there's a way to optimize that away.

@panesofglass
Copy link
Contributor

I'm guessing there is a way to optimize this. Glad to know I'm not crazy. I found this same issue in the past but didn't have time to figure out why it was so bad.

@panesofglass panesofglass modified the milestone: 3.0 Oct 31, 2018
@et1975 et1975 changed the title >?= (Pipline.compose) on freya<PipelineChoice> and freyaRouter causes significant delay in every request >?= (Pipeline.compose) on freya<PipelineChoice> and freyaRouter causes significant delay in every request Oct 31, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants