totpero / DeviceDetector.NET

The Universal Device Detection library will parse any User Agent and detect the browser, operating system, device used (desktop, tablet, mobile, tv, cars, console, etc.), brand and model.
Apache License 2.0
343 stars 73 forks source link

No recent NuGet release #35

Closed emilsteen closed 3 years ago

emilsteen commented 3 years ago

More than seven months ago there was caching added to the DeviceDetector.NET, that implementation is still not released as a NuGet package.

When I run the Visual Studio Performance Profiler on the current release (4.2.0) it reports that DeviceDetector.NET creates almost 50,000 objects every page load on our web sites. Performance Profiler reports that DeviceDetector.NET creates 20,000 RegexNodes, 13,000 arrays of RegexNodes and 12,000 Generic Lists with RegexNodes. Not counting 5,000 ints, 3,500 StringBuilders and other objects. This generates a lots of memory management and garbage collecting.

So caching is more or less needed for this to work in production.

totpero commented 3 years ago

Hi @emilsteen check last release v4.3.0