I have 2 different classes that I am testing to send files to the browser. First of all, the range-specific headers are used to start over again
The second uses the reading to send large files. First of all, in the context of a download speed, slower than the second one. With the first one I can get as fast as possible, I can not be more than 80KB / s.
I did some tests and the result was the same. Is this an illusion, or is there something in the past which slow down the download speed?
I also noticed that one starts blocking the other requests first. For example, if I request a file from the server first with a server, my request will not be answered until the completion of my download. Even if I request a different page it does not do that if I open different sessions from different browsers.
Thank you.
Finally! I'm able to fix the problem by adding EnableSessionState = "ReadOnly" on the download page
"Use only the readable attribute when you can
For pages that only need to read session data, readSecureSessionState read only Consider only that.
Why
The page is requesting that the use of session state uses the reader lock object to manage session data internally. Allows multiple reading in time when To update the status of the session, all reading requests are blocked. Generally, two calls are created in the database for each request. The first call connects to the database, in the form of a lock Marks the session, and executes the page.The second call writes any changes and unlocks the session. By setting the EnableSessionState to read, you avoid the blocking They are, and you send less calls to the database, thus improving the performance. "
Comments
Post a Comment