Hyperlink Styles

Posted by: mserban on 9 August 2018, 8:16 pm EST

    • Post Options:
    • Link

    Posted 9 August 2018, 8:16 pm EST

    Hello,

    We are trying to load a rather large (about 20.000 rows) file in Spread JS. One of the columns is a hyperlink and each of the hyperlink cells has a unique style that looks a bit like this, but we a few other properties like font and borders set.

    {"cellType":
    {"typeName":"8","linkColor":"rgb(0, 0, 255)","visitedLinkColor":"rgb(255, 0, 0)","text":"SpreadJS Web Site","linkToolTip":"SpreadJS Web Site"}}
    

    Because each cell needs to have a unique text value, we can not reuse the same style for all the column, and this in turn crashes the Chrome tab when it runs out of js memory.

    Is there a way around this? Perhaps taking the text used out of the style property or something like a partial common style, or any other suggestion on how to improve memory consumption?

    Thanks,

  • Posted 12 August 2018, 8:04 pm EST

    Hello,

    I would suggest you to set the style for each cell between a isPaintSuspended(true) and isPaintSuspended(false) block. It will stop Spread.Sheets to paint all cells whenever you apply a style to individual cells.

    Thanks,

    Deepak Sharma

  • Posted 21 August 2018, 5:52 am EST

    Hi Deepak,

    Thanks for the feedback. Unfortunately, it looks like we are already using the suspend/resumePaint methods which I understand are the newer version of isPaintSuspened.

    I’ve uploaded a sample file that can be used to reproduce our issue at https://trial.obero.net/LargeJson.zip. If you try to use the open option in the Inspector Sample (https://www.grapecity.com/en/demos/spread/JS/InspectorSample/) in Chrome you’ll see an error message appear that seems to be related to the large memory usage by Spread.JS. As I’ve said in my original post, the file itself is very large so the error is not unexpected, but I was wandering if there is anything that could be changed on our side that would improve the performance.

    Thanks,

  • Posted 21 August 2018, 7:59 pm EST

    Hello,

    I tried to download the JSON file, but it seems the file is removed from the location. Here is the error message I received while visiting :https://trial.obero.net/LargeJson.zip

    “The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.”

    Thanks,

    Deepak Sharma

  • Posted 22 August 2018, 8:17 pm EST

    Hi,

    Sorry about that the correct link is https://trial.obero.net/LargeFile.zip

    Looks like it compressed really well so it can actually be attached to this thread as well.

    LargeFile.zip

  • Posted 23 August 2018, 10:50 pm EST

    Hello,

    I am able to replicate this issue at my end with the file you provided. I have submitted it as a bug to the development team. I will let you know as soon as I get an update on it.

    The bug id for this issue is #262793

    Thanks,

    Deepak Sharma

  • Posted 27 August 2018, 8:40 pm EST

    Hello,

    Developers found that you have too many formulas in your JSON file which is causing the issue here. There are 124147 different formulas. There is a lot of SUMIFS function with a big range, like below:

    “SUMIFS(T$29:T$20549,$S$29:$S$20549,$L5,$EA$29:$EA$20549,1)”

    You can use the code below to optimize the load speed.

    var fromOption = {

    doNotRecalculateAfterLoad: true

    }

    workbook.fromJSON(jsonData, fromOption);

    Thanks,

    Deepak Sharma

Need extra support?

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

Learn More

Forum Channels