ViewState compression does work on 2014.1.226.45

8 posts, 0 answers
  1. Matt Smith
    Matt Smith avatar
    17 posts
    Member since:
    Dec 2005

    Posted 26 Feb 2014 Link to this post

    I am trying to implement the veiwstate compression and find that it is not compressing the viewstate AT ALL. I have followed the instructions to add the browser file and my viewstate is not changing in size.

    Has something changed or is the documentation not up-to-date.
  2. Angel Petrov
    Admin
    Angel Petrov avatar
    1007 posts

    Posted 03 Mar 2014 Link to this post

    Hello Matt,

    I have to say that this is not an expected behavior. Could you please ensure that the dynamic IIS compression is not enabled? In such cases using RadCompression is not required as this will result in double compression.

    In order to further research what is causing this problem I would suggest opening a formal support ticket and attaching an isolated sample in which it can be observed. That would greatly facilitate us in resolving this matter.

    Regards,
    Angel Petrov
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the UI for ASP.NET AJAX, subscribe to the blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Matt Smith
    Matt Smith avatar
    17 posts
    Member since:
    Dec 2005

    Posted 03 Mar 2014 in reply to Angel Petrov Link to this post

    Angel,

    As far as I know, IIS in Windows 8.1 does not have dynamic compression on by default. Even so, I was expecting to see the content of the __VIEWSTATE variable to be somewhat smaller in compressed state than non-compressed and for the overall file size to be smaller. I read in a posting that only the downstream is compressed and it is un-compressed by the browser upon receipt. That is good for quick response from the server but if truly the case, bad for going back to the server. The viewstate needs to be compressed so both parts of the trip are as fast as possible.

    So, at the moment, I am not sure how the viewstate compression really works and if it is worth it at all.
  5. Angel Petrov
    Admin
    Angel Petrov avatar
    1007 posts

    Posted 06 Mar 2014 Link to this post

    Hello Matt,

    Actually if you inspect the content of the __VIEWSTATE variable you should not observe any changes as the browser will decompress the content and then display it. However you can inspect the response by using Firebug or Fiddler. In order to determine whether the data is compressed you can follow the steps listed below:
    1. Disable the compression and examine the response with the above mentioned tools.
    2. Enable the compression and check whether there is a difference in the response size.

    Regards,
    Angel Petrov
    Telerik

    DevCraft Q1'14 is here! Join the free online conference to see how this release solves your top-5 .NET challenges. Reserve your seat now!

  6. Matt Smith
    Matt Smith avatar
    17 posts
    Member since:
    Dec 2005

    Posted 06 Mar 2014 in reply to Angel Petrov Link to this post

    If that is the case, this method is only half useful. It provides no benefit on the postback to the server especially if the viewstate is very large.
  7. Angel Petrov
    Admin
    Angel Petrov avatar
    1007 posts

    Posted 11 Mar 2014 Link to this post

    Hello Matt,

    Actually you can enable the compression for regular postback as explained here. I strongly suggest that you examine this blog post in which you can find helpful information regarding the ViewState compression. Also more general information about compression ratio can be found here.

    Note that when RadCompression is enabled the ViewState is compressed by default. You can however compress only it as explained in the first linked article under the ViewState compression section.

    Additionally for your convenience I have created a video(link here) which illustrates the difference in the compressed and uncompressed response. In attachments you can also find the test sample used for creating it.

    Regards,
    Angel Petrov
    Telerik

    DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

  8. Matt Smith
    Matt Smith avatar
    17 posts
    Member since:
    Dec 2005

    Posted 11 Mar 2014 in reply to Angel Petrov Link to this post

    Angel,

    I did read that article and I based my expectations on that. If that is the case, should not the viewstate be smaller when rendered to the page? If not, I would assume it is using the mechanism you have been describing above where it is compressed and then decompressed before the page is rendered at the client. Then I would ask, how is the viewstate compressed for the return trip then? The article you reference here doesn't describe the round trip compression at all.

    The only way I can see it working is that the viewstate would need to be in compressed state through out the round trip meaning the viewstate variable in the page when viewed at the client would be noticeably smaller. When I tried implementing the mechanism in the article referenced, there was no difference in viewstate size. Either I am missing something here or the mechanism was not working at all when I tried using it.
  9. Angel Petrov
    Admin
    Angel Petrov avatar
    1007 posts

    Posted 14 Mar 2014 Link to this post

    Hello Matt,

    When inspecting the rendered page the ViewState should not be smaller as the browser will decompress the response locally. However note that the amount of data which the server sends in such a scenario is significantly smaller as you can see from the video I linked in my previous post.

    As for the ViewState which is sent from the client to the server it is important to know that it is not compressed by our module. RadCompression only compresses the response send from the server to the client.

    Regards,
    Angel Petrov
    Telerik
     

    DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

     
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017