Answer the question
In order to leave comments, you need to log in
Why is SignalR necessary?
Hello! I decided to start learning ASP.NET MVC .
I found a guide on the net ( metanit.com/sharp/mvc/2.1.php ), I am making examples from there. I decided to try something myself: I decided to display a table in the existing view (15 columns 1500 lines). After starting the project, I try. But after loading the page, I get a hang for a while.
In the browser, I looked at what was happening and found that a lot of garbage was being loaded: some kind of script browserLink , requests like
localhost:50806/f7286cf7d99c4a688161aefafd09c787/a...
localhost:50806/f7286cf7d99c4a688161aefafd09c787/a...and a bunch of those.
Answer the question
In order to leave comments, you need to log in
Good afternoon! I doubt that the answer is still relevant, but nevertheless :)
If I'm not mistaken, requests like
localhost:50806/f7286cf7d99c4a688161aefafd09c787/a...
are carried out not by your project at all, but by Visual Studio 2013 itself (in 2012, this seems to have not happened). More details:
1. stackoverflow.com/questions/21508222/where-are-the...
2. blogs.msdn.com/b/webdev/archive/2013/06/28/browser...
About what takes a long time to complete, and so on: there is an assumption that the reason for this is the use of Local IIS Express, under which the web application runs from the debugger in Visual Studio. Try migrating to regular IIS or hosting, in general, move the web application to a more productive environment.
In addition, in real applications, you are unlikely to need to output 1500 lines. From the user's point of view, this is wildly inconvenient, and if many, many lines are displayed, then they are usually paginated.
SignalR allows you not to worry about asynchronous data transfer technologies. Depending on the circumstances, he himself decides which technology to use, either Ajax or WebSockets, etc. It is clear-red that it weighs a lot. On our project, the guys made a web interface for a desktop application and everything works just fine. I think for a small project it is very bold to use such a miracle.
And why actually happens hanging? here is a screen
where you can see that only part of the page was rendered and hung (for ~ 40 seconds) then the rest is displayed
here is a piece of the view code that generates a table
<table>
@for (var i = 0; i < 1500; ++i )
{
<tr>
@for (var j = 0; j < 15; j++ )
{
<td>@i : @j</td>
}
</tr>
}
</table>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question