I'm doing some profiling on a 1.1 app and have identified a problem. It seems that this function is taking forever to load on a certain page:
ParserCacheItem System.Web.UI.TemplateControlParser.CompileAndGetParserCacheItem(String, String, HttpContext)
I've searched around with no luck about what this does. Does anyone know what this function is doing? If I knew then maybe it would shed some light on the situation.
Thanks!?
Its really a process of elimination.
I've had similar problems where it seemed where I was the only one that had encounted a particular issue.
By breaking my page down I found the control that was causing the timeout/error and did some more specific searches around it.
I then found that the error actually had nothing to do with the symptoms I was experiencing, it was being masked by other issues.
It is an investment in time but you might find that there's some control or part of your page thats timing out for some completely unobvious reason and isn't being reported in anyway. You did hint that page was complex.
What does the page consist of?
Have you tried:
removing all elements from the page and running the profiler again and seeing if the same error occurs, if it doesn't add each element back to narrow down what was causing it
are all the namespace references correct for the .aspx?
have you tried running the app on another box thats running IIS to see if configuration might be the issue?
Related
Is it possible, within an asp.net page, to the get time at which point that page was last compiled?
I would like to distinguish between when a page has been delivered, and when that page has been updated, compiled, and then delivered (typically there's a slight delay, but a compile timestamp would make things a bit more concrete).
Ideally a simple solution exists, it's not particularly critical but a bit frustrating when during development we end up refreshing a page x times before the recompiled version appears.
cheers :)
As suggested in the comments, it's likely that this is not possible. I want to close the question but also feel it's useful in case someone searches for similar to know it's already been asked.
While developing a website I experience a weird bug.
From time to time my images or my css are missing.
It's not really predictable and therefore not reproducible.
Usually it happens after I edit my css, save it and reload the page (in the browser).
It's always syntactical correct CSS, so no compilation erros or anything similar.
I think it's the way Grails updates the running application, but I really can't say why or where it happens as it is quite rarely, but definitely annoying.
It doesn't matter if I run the application with my IDE (IntelliJ 9.0.4) or with the commandline (Windows).
The only thing I did not test so far is whether it happens only when I use the IDE or not.
Did anyone experience this?
EDIT:
Sorry for an unclear description:
"missing" means the browser is unable to load the corresponding ressource: "The Ressource () is not available"
Another Edit:
Thanks for the comments so far.
In addition to my main css-file and my images, which change quite frequently, my reset-css-file disappeared. I never touched it since creation, so I think one can exclude the compilation-script as cause of this mess. (further info in the comments)
Like John Smith I arrived here googling for this problem.
But I found another solution, and i hope that it helps you too.
I googled a little bit more and found this discussion Disabling static resource stuff, here i found a contributor of grails application, and author of Resources Plugin, Mark Palmer (take a look his website), telling what he is doing and answering the questions about this plugin.
Today, all you need to do is to update the Resources Plugin to version 1.2-RC1 or a recent one that will fix this problem.
When you say missing, do you mean that the changes are missing, or the whole stylesheet is missing? If it is just your latest changes, it is possible that your browser is caching the previous css file and isn't getting the latest changes. Try doing a "hard refresh" with something like CTRL+F5, or whatever hard refresh is in the browser that you are using. This will force a pull of the latest resources.
Really old question.. but for anybody googling this - I had similar issues with my CSS because of Windows file format on the Linux systems. Once I changed the format to unix, I still had to restart the server for the css to download. Note that somehow the css were downloading earlier although the format was windows and the issue was intermittent.
We have an ASP.Net menu that works fine for everyone except for one developer.
We verified that the source code on his machine is identical to everyone else's. We checked the generated HTML and verified that it is not a display problem. We stepped through the code and made sure that the menu control was set to visible in PreRender.
The really strange thing is that this problem has only been occurring for him in three separate branches. Yet this problem has never been reported in QA or production. We also checked/verified that this problem occurs across all three major browsers.
We cannot show you our code due to the nature of this application. If anyone has ever experienced a similar problem or knows a resolution we appreciate your help.
It sounds like the dev workstation is polluted in some way. Either there's something cached or a system setting somewhere preventing this.
I'd say that if this problem can't be reproduced on any other machine/VM/customer, then don't worry about it.
Have you distilled the problem with a sample app/menu, or is it just in that one particular application?
I've got this very odd bug that appears to be a quirk in Visual Studio 2010: Sometimes, when moving the cursor into double quotes of a CSS style="" attribute the cursor refuses to move. I can't type anything, and the keys that respond are the UP/DOWN cursor keys and the DEL key (but not BACKSPACE).
Typing does nothing, but pushing LEFT/RIGHT on the cursor keys produces the following error:
The operation could not be completed
I've got no idea what's causing this, but I would hazard a guess that Intellisense is getting very confused and bugging out.
At the moment, whenever this happens, I have to write any CSS outsite of the double quotes of the style attribute and then place the cursor where I want the CSS to appear (using the mouse) and press CTRL-V to paste it in. Very annoying :(
There must be a way of fixing this problem...?
Hopefully someone has an answer!
Just encountered the issue in VS 2012, in editing C#.
I noticed that the problem had occurred soon after the trial period of Resharper has ended and i inserted a valid license number. It also happened in only some of the source files.
The solution: Tools->Options->Resharper: Suspend.
Try typing - should work now.
Then: Tools->Options->Resharper: Resume.
Problem gone.
I have encountered this using Visual Studio 2013 and Resharper 8.2.1. None of the solutions provided in this thread worked (even suspending and resuming Resharper)
After contacting JetBrains support, it turned out to be a caching issue.
Deleting all the files from the following directory solved the issue, as Resharper re-creates new caches:
C:\Users\[Username]\AppData\Local\JetBrains\ReSharper\v8.2\SolutionCaches\[Project_reference]
I have some odd issues with the editor occasionally, a workaround for me is:
Ctrl-Tab (x2) to another code file and back to the same code (or alt tab to another app and back, one of these two... can't replicate issue to be sure)
An ultimate solution might be a re-install.
Microsoft have had variations on this problem reported quite a few times via their support portal. Here is one post and if you scroll down you will see a comment with a bunch of other reports all detailing similar(ish) problems.
Microsoft doesn't seem to be able to reproduce the problem but are "duping all the similar keyboard locking problems to a central bug, so that we can think a way to log the events if necessary". Which seems to be a generic response to a lot of these posts. Some people reported that it was simply becuase another window/pane/tab was in focus but I can see the OP obviously did not have this specific problem. Looks to me like one of those random unresolvable bugs. Hope I never get it! There's also numerous forum posts around the Internet, where users stated that removing certain 3rd party plugins has solved this issue.
I just spotted this particular post which has a possibly useful comment on it for you (which also link to this SO post. As I do not have the bug I cannot test its validity for you. The main point of it seems to be something about the keyboard layout switching.
I'm sorry for putting all this into an answer when technically it is not an answer and just a mass of research, but there was no way this was gonna fit into a comment. And also sorry for pretty much link spamming, but again there was no way I could extract everything that they said into this post. I hope there is something useful in there for you :)
EDIT: You should probably check the top rated answer below as this seems to solve a number of peoples issues, although I never had the Resharper plugin and still occasionally experienced this, but now I'm on VS2013 and have not had this problem re-occur, so maybe they fixed it...
Empty the solution cache folder
C:\Users\{UserName}\AppData\Local\JetBrains\ReSharper\v8.2\SolutionCaches\
This was suggested by JetBrains support when I contacted them.
Permanently fixing... Not too sure however I found that pressing pressing Ctrl+Shift+Caps Lock+Tab all at once seems to get rid of this and enables the mouse and keyboard again. I know this isn't the best of solutions but it works.
I have the same problem several times a day. I didn't notice it until I installed the web essentials extension. I just uninstalled it and will see what happens. I have tried reinstalling visual studio with no joy (but again, I didn't notice the problem until after I had already installed the various extensions).
Sometimes, closing and re-opening the specific code window I'm working in fixes it. If that fails, sometimes I close all windows and reopen just the one I was actively editing. If all of that fails it usually requires a complete restart of visual studio.
I find it funny that MSFT says that they can't duplicate the problem. Scott Guthrie experienced it first hand during his MVC4 beta demo here at about 28 minutes in.
UPDATE: So far, as of 4-5-2012 9:33am Central Time, the problem hasn't recurred since uninstalling Web Essentials. This is the longest I've gone without this bug occurring. If I make it through the next 24 hours, I'll be confident in blaming Web Essentials.
UPDATE: 4-6-2012 10:05am Central Time: Well, apparently it wasn't Web Essentials. It happened to me again this morning editing the contents of a block in my _Layout.vbhtml file. Closing the tab and reopening it fixed it.
I frequently encounter this editor freeze, not just on CSS quotes but any file arbitrarily. I have a dual monitor setp and I have the doucment windows one one monitor and all tool windows on the next one. Sometimes, certain tool windows would freeze too (i.e. not respond to click).
Previously, I used to shutdown/restart IDE; but serendipitously, I discovered that switching to/from Full Screen mode, restores sanity. So now everytme I see a freeze, mode switching comes to rescue.
Not sure if this will solve your issue, but worth a shot.
Rant: In general, I find this new WPF based product very falky and unstable than its predeccessors.
I have the same problem on IDE, some times the Return key is not working at all...
My solution is: CLEAN the project/solution.
BTW: CLEANing resolve also other unexpected behaviours after amendements on CSS or HTML.
I tried every other workaround here but nothing seemed to work, and the issue was only present in one solution but not another.
Disabling Resharper fixed it temporarily but it came back after re-enabling it which wasn't a viable long-term solution.
What worked for me was disabling all Resharper Extensions (Under Resharper -> Extension Manager). I was able to type again even after re-enabling all of them, so I'm unsure which extension specifically caused the issue, but that's another route to try for people who still have this issue.
I never had the problem until I installed plugins/extensions. Curious to know if anyone has had this problem without having any plugins/extensions installed. I don't know if they are the actual cause but since benefits of the plugins outweigh the occasional lockup, I have left them installed. BTW, I use the "closing/reopening of the window with the lockup" technique.
Using a source control (GIT, AKSVN)? If so, disable it, restart VS then enable it and open the solution again.
I am puzzled. I looked at the trace of a pagecall that was "slow" to load according to my boss, causing the page to partially load, and then "jump" to the memorized scroll-place on a postback.
I found out eventually, using my trace, that my whole loading, from Begin PreInit to End Render, took 1.94 seconds, 1.5 of which are spent between Begin PreRender and End PreRender.
Any idea on what could cause that? The next biggest loadtime is 0.14 seconds, for End PreRenderComplete.
Could the problem originate from my queries to SQL Server, or a too vast quantity of controls on the page, even though most are "hidden"?
[edit:]It seems that my page load is very long when I show a certain form. My total render size is of 91537 bytes, 44483 of which are dedicated to that specific form. My viewstate seems kindof enormous. Also: Can a 404 to a JS file cause that kind of lag on load?
[update:] So I found the longest-running query, and it seems that even though it DOES seem quite chunky, it has ended running long before the page is even loaded.
As added information: I am using quite a bit of SqlDataSources troughout the controls, to fill my dropdownlists and other interesting stuff of the like. Is that cluttering my app?
In my experience (same problem as you), it's 90% a SQL issue.
Put some Stopwatch(es) around the query you are calling to find out which query is running slow.
Rendering asp.net control can't take so long....
In order to identify the cause of a bottleneck you really ought to profile your code with a tool like ANTS Profiler or something similar.
A profiler will allow you to pinpoint the problem area by showing you which lines of code are slower than others.
I would use YSlow to determine if its from something on the client side or server side. We sometimes add timers to some queries then output the time to execute in an html comment... of course removing them when the testing is complete.
Does the page call anything hosted on an external site?
Your best bet is to use the Perfomance Wizard in Visual Studio and look at the Call Tree for your page. It will give you more details into the exact performance bottleneck.
I have seen this type of performance when there are too many complex controls declared on the page. Although it could easily be SQL related as well. To know for certain you need to look at the Call Tree and find out what the most expensive call is.
Of course, if it is sql-related, as many people have noted, "sql server profiler" is the tool to use (given that you're running mssql). mysql has "jetprofiler" (.com) which i haven't tried. once you've found the slow query, it's not rarely an indexing issue.