V
V
Vitaly Rybchenko2018-07-16 10:06:05
ASP.NET
Vitaly Rybchenko, 2018-07-16 10:06:05

Why does the site freeze when working with two windows?

Hello!
I have a system on asp.net web forms. To display some pages, you need to perform rather large database queries (for example, generating reports). The report opens in a new window, as if allowing the user to work mainly while the report is being generated.
But the problem is that as soon as a request is sent to the server and until the server responds, then open at least 10 windows, but none of them will load information until the server response is received from the first window (where the download was initiated).
At the same time, if you open 2 browsers, then everything works fine in parallel. The problem is only within one.
How to treat it? And to be treated?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry Kovalsky, 2018-07-16
@dmitryKovalskiy

Sounds like it's hard to tell, of course. The reason why it works from different browsers is most likely due to the fact that authorization in different browsers initiates different session identifiers and in fact each user lives his own life, which is correct.
Regarding the main task - the problem is purely architectural. Large heavy SQL queries cannot be executed synchronously with user actions. Bypass as you wish, but report generation cannot and should not be implemented through a synchronous request. And no - async/await won't fix the situation. If you want to make a visual representation of the data - optimize the query, denormalize the tables, build indexes, in general, understand the query-plan, which takes a long time.
Some calculations can be precalculated in advance (although this is very rare, but it happens).
Again, the question is whether the user needs the entire report data set or just some squeeze (top 10 from something). If you need everything, then it might be worth implementing it through uploading to a file and mail, and not to the system interface.

A
Alexander Aksentiev, 2018-07-16
@Sanasol

https://blog.ksdaemon.ru/2010/12/subvisanie-veb-pr...

If you believe the Internet, then ASP.NET has a similar problem, because all requests to the server that work with the session, just like in PHP, are serialized, and processing of the next request does not begin until the previous one ends. This is solved by setting IReadOnlySessionState instead of IRequiresSessionState, in this case the session is not blocked, and the parallel request (regardless of the use of the session) is processed successfully.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question