[OPEN] [#1351] [4.1.0] Chrome 49+ multipart/form-data issue

  1. #1

    [OPEN] [#1351] [4.1.0] Chrome 49+ multipart/form-data issue

    Hello everyone,

    I'm using the HTML editor field and the File Upload Field on the same page. This page is used for editing emails. Because of rich templates that contain conditional comments with styles for particular email clients the resulting HTML can be few hundreds of KB.
    When the content of HTML is pretty big every postback freezes Chrome for a long time (15-70 sec).All other browsers work fine on that page.
    After some investigations I found out that the actual request is processed in a few milliseconds, but parsing of the result takes so long. If I delete the File Upload Field from the page the "content type" of postbacks becomes "application/x-www-form-urlencoded" instead of "multipart/form-data" and the response processing time decreases to few seconds.
    Here is the comparison of the request timelines:
    Click image for larger version. 

Name:	Issue1.png 
Views:	162 
Size:	49.7 KB 
ID:	24653
    Click image for larger version. 

Name:	Issue2.png 
Views:	136 
Size:	66.4 KB 
ID:	24654

    The issue can be reproduced easily using this sample code:
    <%@ Page Language="C#" AutoEventWireup="true" %>
    
    <script runat="server">
    
        private void PopulateClick(object sender, DirectEventArgs e)
        {
            var r = new Random();
            var content = String.Join("", Enumerable.Range(1, 100 * 1024).Select(_ => r.Next(0, 9).ToString()));
            content = String.Format("<p>Small amount of text <!--{0}--> <br/> The second line</p>", content);
            Editor.Value = content;
            HiddenField1.Value = Convert.ToBase64String(Encoding.UTF8.GetBytes(content));
        }
    </script>
    
    <!DOCTYPE html>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>Html Editor Chrome issue </title>
    </head>
    <body>
        <form id="form1" runat="server">
            <ext:ResourceManager runat="server" AjaxViewStateMode="Enabled" ViewStateMode="Enabled"></ext:ResourceManager>
            <ext:Hidden runat="server" ID="HiddenField1"></ext:Hidden>
            <ext:Toolbar runat="server">
                <Items>
                    <ext:Button runat="server" Text="Populate">
                        <DirectEvents>
                            <Click OnEvent="PopulateClick" ></Click>
                        </DirectEvents>
                    </ext:Button>
                    <ext:FileUploadField runat="server" Text="File" ID="FileUploadField1"></ext:FileUploadField>
                </Items>
            </ext:Toolbar>
            <ext:HtmlEditor runat="server" ID="Editor" Width="1000" Height="500"></ext:HtmlEditor>
        </form>
    </body>
    </html>
    Does anyone know the solution for this issue or at least some hack/workaround?
    PS: This issue appeared recently but the code wasn't updated for a while. This might be related to the changes between different Chrome versions (The "improvements" of the latest versions).
  2. #2
    Hello suhuy!

    Using chrome 51.0.2704.103 m here and couldn't reproduce the issue with the example you provided. What am I exactly supposed to do on the example you provided in order to reproduce the long loong time?
    Last edited by fabricio.murta; Jun 23, 2016 at 7:25 PM. Reason: chrom? chrome!
  3. #3

    Here are more concrete specs and demo

    Thank you for your reply,

    I've tried different versions of IIS, different OS, and different versions of chrome, and the issue can be reproduced always.
    OS: Windows 8.1, Windows 10 (10586 TH2), Windows 2012 R2
    IIS: 8.5 , 10, 10 Express
    Browsers: Chrome 51 (latest stable), Chromium 43 - 53 (stable portable)

    During some investigations i found out that all versions before 49 work fine, and all after 49 (including it) have that issue.
    Here you can see the video demonstration. On the video i'm opening the same page in 3 browsers:
    • Chromium 48 on Hyper-V virtual machine
    • Chromium 49 on Hyper-V virtual machine
    • Chrome 51 64 bit on Physical machine

    The difference in the rendering time of the same page is significant.

    http://screencast.com/t/pO7orKli5

    To be sure that the provided example is isolated from all other code, I created a new solution with a web forms project in it. Then i installed Ext.Net from nuget and pasted the same code as i wrote to the default page. The result is the same as in our main solution.
  4. #4
    Hello again, @suhuy!

    Thanks for the thorough investigation on the issue, you are right. For some reason this didn't reproduce on Chrome 51 to me yesterday, yet it just reproduced here now!..

    I can see chrome gets stuck and "thinking" (consuming CPU cycles) in JavaScript code processing. In fact, if I just break in the debugger, I can see I am walking around (seemingly) chrome-specific javascript code. Definitely, not Ext.NET nor ExtJS JavaScript was on the stepped code. Nor was Ext.NET/ExtJS functions in stack trace.

    Well, so we just logged issue #1351 in our bug tracker to follow this problem! Sorry, at the moment we still don't have a work-around for this long delay issue.

    Thanks for reporting the issue!
    Fabrício Murta
    Developer & Support Expert

Similar Threads

  1. Replies: 10
    Last Post: Oct 29, 2015, 8:15 AM
  2. Replies: 7
    Last Post: May 30, 2015, 5:16 PM
  3. Form Panel Json data mapping Issue
    By ufkgrgn in forum 2.x Help
    Replies: 0
    Last Post: Dec 15, 2014, 8:47 AM
  4. Replies: 8
    Last Post: Dec 20, 2013, 7:14 PM
  5. [CLOSED] Form post issue for gridpanel inside form panel
    By alscg in forum 2.x Legacy Premium Help
    Replies: 3
    Last Post: Dec 19, 2013, 1:16 PM

Tags for this Thread

Posting Permissions