Glimpse/Glimpse — Issue #157: Glimpse.Mvc3 trace output brings system to a crawl
Author: ErikRydgren
Created: 2012-02-06 21:15:32+00:00
State: open

Hi!

First of all, thanks for all the hard work! Glimpse is great.

But,

(you just *knew* a BUT was coming didn't you? :-) )

My company have an MVC3 Razor application that uses Glimpse for the obvious reasons. The application have an file upload functionality that upload large files in chunks. Each chuck is uploaded with an Ajax HTTP POST.

I have noticed that the uploads goes VERY slow after a while if the run through the debugger and having Glimpse active.
The reason is that the trace output becomes a single long row of *SOMECLASS.GetValueProvider(controllerContext) = STUFF* repeated over and over with some *IDependencyResolver.GetService<SOMECLASS>() = STUFF* mixed in.

Visual Studio doesn't like displaying long debug strings in the first place, not to mention appending and scrolling them horizontally for display.

I forked the Glimpse source and tracked to problem to Glimpse.Mvc3.Plumbing.GlimpseDependencyResolver and Glimpse.Mvc3.Plumbing.GlimpseValueProviderFactory.

Are there special reasons for using Trace.Write instead of Trace.WriteLine in those classes?

Regards
Erik Rydgren
Sweden