Skip to content
This repository has been archived by the owner on Jan 24, 2021. It is now read-only.

Slow to construct NancyHost on Raspberry Pi? #2986

Open
robertoldaker opened this issue Sep 25, 2019 · 0 comments
Open

Slow to construct NancyHost on Raspberry Pi? #2986

robertoldaker opened this issue Sep 25, 2019 · 0 comments

Comments

@robertoldaker
Copy link

My code using Nancy and Nancy Self-Hosting is working fine and does it job great :).

However ... the issue I have is that it is very, very slow to start on a Raspberry Pi. This is the startup code below:-

var uri = new Uri("http://localhost:" + portNum.ToString());var urlReservations = new UrlReservations(); urlReservations.CreateAutomatically = true; Logger.Instance.LogInfoEvent("Constructing NancyHost ..."); m_host = new NancyHost(uri, new CustomConventionsBootstrapper(), new HostConfiguration() { AllowChunkedEncoding = false, UrlReservations = urlReservations }); Logger.Instance.LogInfoEvent("Starting Nancy Host ..."); m_host.Start(); Logger.Instance.LogInfoEvent("Nancy Host started on port: " + m_settings.PortNum.ToString());

It takes about 25secs to construct the NancyHost object on a rPi 3 and about 45secs on a rPi-Zero.

Any ideas why it would be taking so long and is there anything I might be able to do about it?

I am using v1.4.5 of Nancy and v1.4.1 of Nancy self-host. I cannot upgrade to the latest version since my code would require significant code changes.

Also using mono v6.0.0 on the latest build of Raspbian Buster.

Thanks in advance for any help or advice you can give.

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