janhebnes / startlist.club

Flight Log for flight clubs - created for handling flight log operations for soaring flight clubs in northern Europe.
https://startlist.club/about
MIT License
13 stars 10 forks source link

Issue for CPU (Excessive string concatenation is causing lots of allocation...) #250

Open janhebnes opened 5 months ago

janhebnes commented 5 months ago

Description: Excessive string concatenation is causing lots of allocations and CPU consumption.

Current condition: 36% of your CPU was spent in String.Concat called from FlightJournal.Web.Controllers.ReportController.Export. We expected this value to be <1%.

Recommendations: Consider using cheaper alternatives such as String.Join or a StringBuilder instead.

Call Stack:

clr!WKS::gc_heap::allocate_large_object clr!WKS::GCHeap::Alloc clr!Alloc clr!SlowAllocateString clr!FramedAllocateString mscorlib!System.String.Concat(class System.String,class System.String) flightjournal.web!FlightJournal.Web.Controllers.ReportController+<>c__DisplayClass2_0.b__7(class System.String,class FlightJournal.Web.Models.Flight) System.Core!System.Linq.Enumerable.Aggregate(class System.Collections.Generic.IEnumerable1<!!0>,!!1,class System.Func3<!!1,!!0,!!1>) flightjournal.web!FlightJournal.Web.Controllers.ReportController.Export(int32,value class System.Nullable`1) anonymously hosted dynamicmethods assembly!dynamicClass.lambda_method(pMT: 0F917E84,pMT: 1262BBB4,class System.Object[]) system.web.mvc!System.Web.Mvc.ActionMethodDispatcher.Execute(class System.Web.Mvc.ControllerBase,class S