I have to render Survey multiple times without refresh the page and,
I found that memory consumption keep increasing when Survey are created.
Is there any function like destroy() to reclaim memory ?
I have to render Survey multiple times without refresh the page and,
I found that memory consumption keep increasing when Survey are created.
Is there any function like destroy() to reclaim memory ?
Hello,
I've fixed the issue via the https://github.com/surveyjs/survey-library/commit/ed7234d94f2a7c7db1a5e251342b2c2fd3801650 commit. Fix will be available in the nearest update.
Instead of
JavaScriptfunction cancelChecklist() {
SURVEY_INSTANCE.doComplete();
SURVEY_INSTANCE = null;
jQuery("#surveyElement").html("");
}
You need to use the following code:
JavaScriptfunction cancelChecklist() {
SURVEY_INSTANCE.doComplete();
SURVEY_INSTANCE.dispose();
SURVEY_INSTANCE = null;
}
Thanks, Serge
SurveyJS Team
Thanks for your quick fix and response.
Can you tell me when is your next release date?
Hello,
We are going to release v1.7.4 tomorrow or after tomorrow.
Thank you,
Andrew
SurveyJS Team
Hello,
Can you share - what framework are you using and the JSON to reproduce and investigate the issue on our side?
Thanks, Serge
SurveyJS Team
I'm using jQuery version.
I can tell the JSON is generated dynamically with around 15 pages matrixdropdown with 5-10 question each page.
All question is around 100-140 question.
Example
{ pages: [ { questions : [ { "type":"matrixdropdown", "name":"id", "title":"Title", "titleLocation":"hidden", "showHeader":false, "columns":[ { "name":"Static text", "title":"Static text", "expression":"\"This is static text\"", "cellType":"expression" }, { "name":"Answer", "title":"Answer", "isRequired":true }, { "name":"comments", "title":"comments", "cellType":"text" }, { "name":"hiddenField", "title":" ", "cellType":"text", "visibleIf":"1=2" } ], "rows":[ { "value":"key", "text":"My Text" } ], "choices":[ "Option1", "Option2" ] } ], name: "pageName"}] }
Thanks
Hello,
Could you please attach your JavaScript code and JSON. The JSON that you gave us, could not help us a lot to reproduce the issue.
Thank you,
Andrew
SurveyJS Team
I attached the html. Please try hitting delete and create button and see the memory in task manager.
Thank you for the provided sample. I've reproduced the issue. We've started to work on it. I'll updated this thread as soon as we'll get any results.
Serge,
SurveyJS Team