locked
Slow typing on big data in repeater RRS feed

  • Question

  • User746671234 posted
    Hello I am using repeater control with text box. I need to input some value in it. It was working fine with some small data but as the data increases its typing very slowly in textbox. I can't show less data in a page I must have to show all data at once. What is the best solution for this?
    Monday, January 1, 2018 8:33 PM

All replies

  • User-707554951 posted

    Hi ravininave,

    From your description,  I am not clear about your problem, would you please show us with some code that used to reproduce your problem?

    I can't show less data in a page I must have to show all data at once.

    Besides, what the above description means?

    How you bind data to your repeater?

    Where do you store the source data?

    Best regards 

    Cathy

    Tuesday, January 2, 2018 6:56 AM
  • User746671234 posted

    Here is the HTML.  I am binding data in two repeaters.  In first I am showing the RECEIVER details with their order id and amount.  

    Second repeater is PAYEE repeater, In second repeater I put the textboxes where I put Order id of RECEIVER and amount and then I submit the data.

    This was working fine when data was upto 30-40 rows.

    But now data is about 200- 300 rows and when I try to put order id in textbox it takes too much time to type.

    <div class="row">
        <div class="col-xs col-sm-12 col-md-12 col-lg-12 col-xl-5 ">
            <div class="card card-style-1 ">
                <div class="card-heading">
                    <h5>RECEIVER</h5>
                    <p>
                        <asp:Label ID="lblRecPay" runat="server" Text=""></asp:Label></p>
                </div>
                <div class="card-body">
                    <table id="basic_table2" class="table table-bordered table-sm table-responsive table-striped ">
                        <asp:Repeater ID="mL" runat="server">
                            <HeaderTemplate>
                                <thead>
                                    <th>ORD NO.</th>
                                    <th>ORD DT</th>
                                    <th>USER NAME</th>
                                    <th>CITY</th>
                                    <th>CELL NO.</th>
                                    <th>AMOUNT</th>
                                </thead>
                            </HeaderTemplate>
                            <ItemTemplate>
                                <tr>
                                    <td><b><%#Eval("RSrNo") %></b></td>
                                    <td><%#Eval("RecDate") %></td>
                                    <td><%#Eval("AppMstLoginName") %><br />
                                        <%#Eval("Sponsor") %></td>
                                    <td><%#Eval("AppMstCity") %></td>
                                    <td><%#Eval("AppMstCell") %></td>
                                    <td><b><%#Eval("Amount") %></b></td>
                                </tr>
                            </ItemTemplate>
                        </asp:Repeater>
                    </table>
                </div>
            </div>
        </div>
    
        <div class="col-xs col-sm-12 col-md-12 col-lg-12 col-xl-7 ">
            <div class="card card-style-1 ">
                <div class="card-heading">
                    <h5>PAYEE</h5>
                    <p>
                        <asp:Label ID="lblSender" runat="server" Text=""></asp:Label></p>
                </div>
                <div class="card-body">
                    <table id="basic_table1" class="table table-bordered table-sm table-responsive table-striped ">
                        <asp:Repeater ID="VL" runat="server">
                            <HeaderTemplate>
                                <thead>
                                    <th>ORD</th>
                                    <th>ORD DT</th>
                                    <th>USER NAME</th>
                                    <th>CITY</th>
                                    <th>CELL NO.</th>
                                    <th>AMOUNT</th>
                                    <th>PAY</th>
                                    <th>ORD NO.</th>
                                </thead>
                            </HeaderTemplate>
                            <ItemTemplate>
                                <tr>
                                    <td><b>
                                        <asp:Label ID="lblRNo" runat="server" Text='<%#Eval("FsrNo") %>'></asp:Label></b></td>
                                    <td><%#Eval("SendDate") %></td>
                                    <td><%#Eval("AppMstLoginName") %>
                                        <br />
                                        <%#Eval("Sponsor") %></td>
                                    <td><%#Eval("AppMstCity") %></td>
                                    <td><%#Eval("AppMstCell") %></td>
                                    <td><b><%#Eval("Amount") %></b></td>
                                    <td>
                                        <asp:TextBox ID="txtPay" runat="server" Width="100%" onkeypress="return isNumber(event)"></asp:TextBox></td>
                                    <td>
                                        <asp:TextBox ID="txtOrd" runat="server" Width="70%" onkeypress="return isNumber(event)"></asp:TextBox></td>
                                </tr>
                            </ItemTemplate>
                        </asp:Repeater>
                    </table>
                </div>
            </div>
        </div>
    </div>
    Tuesday, January 2, 2018 7:54 AM
  • User753101303 posted

    Hi,

    The first step would be to find where it happens for example by using F12 tools in your browser. Or what if you are not calling the isNumber function? Could it be that it checks all textboxes?

    Tuesday, January 2, 2018 8:09 AM
  • User746671234 posted

    Though I disabled the isNumber function it slows down

    Tuesday, January 2, 2018 8:10 AM
  • User753101303 posted

    And you don't have any other code running such as maybe computing a total from those textboxes ? If you really don't find, try F12 for JavaScript and rendering performances. It might take some time if new but then you'll have a very valuable tool to diagnose future issues.

    Tuesday, January 2, 2018 8:22 AM
  • User746671234 posted

    No I'm not doing any calculation.  I think that when number of textbox server control increases it slows down.  I don't know?  What it has to do with javascript? 

    Tuesday, January 2, 2018 8:25 AM
  • User753101303 posted

    I'm trying to understand which kind of work is done while you type. It you are 100% sure this is not JavaScript, could it be that the page layout is computed again and again?

    Try perhaps another browser and/or a simple HTML page with copy/pasted textboxes. I don't see why typing in a single textbox would significantly slow down depending on how many other textboxes are found in the page. 

    At some point using a tool such as https://developers.google.com/web/tools/chrome-devtools/evaluate-performance/reference could be quicker than trying to guess.

    Tuesday, January 2, 2018 8:43 AM
  • User746671234 posted

    I also thought so.  I tried with edge and it was working there but with other browsers it's not working.

    Tuesday, January 2, 2018 8:59 AM
  • User753101303 posted

    Maybe some bootstrap code that kicks in or a rendering layout issue? Please do use F12 Tools to see what it gives...

    Tuesday, January 2, 2018 9:05 AM
  • User746671234 posted

    May be I have to find it.

    Tuesday, January 2, 2018 9:08 AM
  • User753101303 posted

    Yes, just use F12.

    When something "doesn't work" and especially without any error message, it is IMO often much quicker to use this kind of debugging tools to SEE what actually happens rather than to look at the code and try to guess what happens.

    Using debugging tools (or taking the time to correctly understand an error mesage) will be a huge time saver even if you have an initial learning curve, compared with the "guessing game" approach.

    Tuesday, January 2, 2018 12:56 PM
  • User746671234 posted

    Hello sorry for late reply.  I tried disabling all the javascript but it was not working and finally I came to know that when I disable one of the css file then it works fine.  But how could I find that where is an error in css file.

    Saturday, January 13, 2018 6:31 PM