Author Topic: "Maximum call stak size exceeded" error with filtering.  (Read 9566 times)

wd_perf

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 26
    • View Profile
"Maximum call stak size exceeded" error with filtering.
« on: March 17, 2016, 10:21:39 pm »
Hi,  I'm using local filtering. I found that the error happens when the part of the PQGrid has more than 10000 records or rows.  It happens when I search with $ (dollar) symbol only (for example:  42$1234).  It throws the exception in browser console and the PQGrid will become unresponsive.  Can you please let me know to fix this issue.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: "Maximum call stak size exceeded" error with filtering.
« Reply #1 on: March 17, 2016, 10:35:17 pm »
Which version are you using?

Is it possible for you to share a test case with reproducible issue.

wd_perf

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 26
    • View Profile
Re: "Maximum call stak size exceeded" error with filtering.
« Reply #2 on: March 18, 2016, 02:51:03 am »
I am using version 3.3.0. 

#Sample script for rendering grid

var data = json with 100000 objects in data

var renderGrid = function (container, title, headers, data, exportHandler) {
        var str = JSON.stringify(data).replace(/\bNaN\b/g, "");
        str = str.replace(/\bNAN\b/g, "");
        data = JSON.parse(str);
        var grid = {
            title: title,
            topVisible: false,
            flexHeight: false,
            showTop: true,
            showBottom: true,
            showHeader: true,
            roundedCorners: true,
            hoverMode: 'row',
            numberCell: {width: 70, resizable: true},
            virtualX: true,
            virtualY: true,
            virtualXHeader: false,
            width: 'auto',
            flex: { one: true },
            selectionModel: {type: 'row', mode: 'single', fireSelectChange: true},
            filterModel: {on: true, mode: "AND", header: true},
            collapsible: {on: false},
            toolbar: {
                cls: 'pq-toolbar-crud',
                style: 'text-align: right;',
                items: [
                    {
                        type: 'button',
                        style: 'font-size: 10px; padding: 5px;',
                        label: 'Export to CSV',
                        icon: 'ui-icon-plus',
                        listeners: [{click: exportHandler}]
                    }
                ]
            }
        };

        grid.colModel = headers;
        grid.dataModel = {
            data: data,
            location: "local",
            sorting: "local"
        };

        var pqGridObj = $(container).pqGrid(grid);
        var tempGrid = pqGridObj.pqGrid("getInstance").grid;
        for (var i in headers) {
            if (headers.dataType == "string") {
                headers.align = "left";
            }
            var filter = headers.filter;
            if (filter.type == "select" && filter.attr == "multiple" && filter.condition == "range") {
                filter.cache = null;
                filter.options = tempGrid.getData({dataIndx: [headers.dataIndx]});
            }

        }
        return pqGridObj;
    };
   
    renderGrid("#divId", "title", data.headers, data.data);

wd_perf

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 26
    • View Profile
Re: "Maximum call stak size exceeded" error with filtering.
« Reply #3 on: March 18, 2016, 03:12:40 am »
when I tested in my local with 90000 PQGrid seems to be working fine.  can you try with data more than 100000, 200000, 300000 ..... 1million to reproduce.  I got the exception in browser console when I was testing 215000 rows.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: "Maximum call stak size exceeded" error with filtering.
« Reply #4 on: March 18, 2016, 08:41:33 am »
Your test case is incomplete.

I've created a similar jsfiddle http://jsfiddle.net/ffwx6xfs/ with 50,000 records, I couldn't reproduce the error mentioned by you.

Please let me know the steps to reproduce the error in the above jsfiddle.
« Last Edit: March 18, 2016, 08:43:33 am by paramquery »

wd_perf

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 26
    • View Profile
Re: "Maximum call stak size exceeded" error with filtering.
« Reply #5 on: March 19, 2016, 04:02:44 am »
Please find the jsfiddle.  http://jsfiddle.net/nhnjvoj9/2/
Open the bowser console then In the filter box search with 1207$ to see the error.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: "Maximum call stak size exceeded" error with filtering.
« Reply #6 on: March 27, 2016, 04:44:38 pm »
Thanks for reporting this issue, I was able to reproduce it with 3,00,000 records. It has been fixed in the upcoming version.

wd_perf

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 26
    • View Profile
Re: "Maximum call stak size exceeded" error with filtering.
« Reply #7 on: July 15, 2016, 03:22:48 am »
Hi,  Can you please let me know when can I can get the updated version for this fix?

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: "Maximum call stak size exceeded" error with filtering.
« Reply #8 on: July 15, 2016, 09:42:25 am »
Quote
Hi,  Can you please let me know when can I can get the updated version for this fix?

It's already fixed in v3.3.1 released on May 30, 2016

wd_perf

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 26
    • View Profile
Re: "Maximum call stak size exceeded" error with filtering.
« Reply #9 on: July 19, 2016, 11:39:16 pm »
can you please send me the latest patch through the provided email?

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: "Maximum call stak size exceeded" error with filtering.
« Reply #10 on: July 19, 2016, 11:58:16 pm »
If you are an evaluation user, latest version can be downloaded from the download page. http://paramquery.com/pro/download/evaluate

If you are licensed user please share your Transaction Id and date of purchase so that your account can be upgraded.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: "Maximum call stak size exceeded" error with filtering.
« Reply #11 on: July 20, 2016, 10:05:28 am »
Thanks for the confirmation.

Your account has been upgraded to Pro Ultimate. All downloads are available from your account under the menu "Pro Downloads".

wd_perf

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 26
    • View Profile
Re: "Maximum call stak size exceeded" error with filtering.
« Reply #12 on: July 21, 2016, 06:03:05 am »
Thanks for your reply.  I did downloaded the latest version of PQgrid 3.3.1.  It seems the issue got resolved.  I don't see the "Max call stak exceeded" error,  but I do see lot of performance issues.  Its not filtering smooth for the large data set after I applied the new version.  For each and every alphabet or number I enter in filter box its taking time to retrieve the results and the page is not responsive until then I can't able to enter the next alphabet or number.  The time between two alphabets or numbers to filter in the textbox is 1 to 2 minutes.  Definitely this will be a performance issue in the customer view perspective.  Please use the previous jsfiddle which I send to test or create one and send it over here, because I don't want to put the latest version of pqgrid.min.js in jsfiddle to test and send it to you.  Thanks in advance for your quick response on this.

wd_perf

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 26
    • View Profile
Re: "Maximum call stak size exceeded" error with filtering.
« Reply #13 on: July 21, 2016, 06:51:47 am »
If I copy the whole word(ex: baseball) and paste it in to the filter text box its works fine and get back the results in 10 seconds.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: "Maximum call stak size exceeded" error with filtering.
« Reply #14 on: July 21, 2016, 11:30:56 pm »
You are right, there is performance issue while filtering of huge number of records.

Please use the attached patch 3.3.1.2.min.js (include it after pqgrid.min.js file ) as a fix to this issue.

Also consider to use 'change' listener instead of 'keyup' listener for filtering if possible.

Please let me know whether it improves the performance in your case.
« Last Edit: July 21, 2016, 11:36:16 pm by paramquery »