FlexGridXlsxConverter.saveAsync - inappropriate frequency of onProgress event

Posted by: arq2002 on 3 August 2022, 6:30 pm EST

  • Posted 3 August 2022, 6:30 pm EST

    Hi,
    When I export grid with a huge amount of columns (10.000) but only 50 rows, event onProgress rises only two times when exporting rows (25% and 51%).
    This is unacceptable, becouse it gives the impression that the process was frozen.

    See the function FlexGridXlsxConverter._saveContentToWorksheet in wijmo.grid.xlsx.js, event is raised every 20 rows, but not more often than every 100 ms


    FlexGridXlsxConverter._saveContentToWorksheet = function(e, l, t, o, r, n, s, i, a, u, d, c, f, h, m, p, x) {
    for (var g = this, v = u ? 20 : 200, _loop_1 = function(_) {
    if (e && e.cancelled) return {
    value: void 0
    };
    if (l && _ - o > v && Date.now() - t > 100) {
    setTimeout((function() {
    if (!e || !e.cancelled) {
    p(_);
    g._saveContentToWorksheet(e, l, Date.now(), _, r, n, s, i, a, u, d, c, f, h, m, p, x)
    }
    }), 0);
    return {
    value: void 0
    }
    }


    I suggest that the event should be raised not more frequently than every 100ms and not less than every 1 sec


    FlexGridXlsxConverter._saveContentToWorksheet = function(e, l, t, o, r, n, s, i, a, u, d, c, f, h, m, p, x) {
    for (var g = this, v = u ? 20 : 200, _loop_1 = function(_) {
    if (e && e.cancelled) return {
    value: void 0
    };

    //Modified by ARQ 03.08.2022
    var elapsedTime = Date.now() - t;
    if (l && ((_ - o > v && elapsedTime > 100) || elapsedTime > 1000)) {

    setTimeout((function() {
    if (!e || !e.cancelled) {
    p(_);
    g._saveContentToWorksheet(e, l, Date.now(), _, r, n, s, i, a, u, d, c, f, h, m, p, x)
    }
    }), 0);
    return {
    value: void 0
    }
    }
  • Replied 7 August 2022, 10:52 pm EST

    Hello,

    We apologize for the delayed response, we are able to replicate the observed behavior at our end and have escalated an enhancement request to our Dev team with an internal tracking ID WJM-24554. We will provide you with an update on this as soon as we get any response.

    Sorry for the inconvenience.

    Regards
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels