For very large reports, cache mode keeps memory usage low by holding only part of the rendered document in memory at a time.

Cache lifecycle. Choose a stable cache key, store the report between requests, and restore it before the next viewer or designer action.
var Stimulsoft = require('stimulsoft-reports-js');

var report = new Stimulsoft.Report.StiReport();
report.loadFile("Over-2.000-pages.mrt");

report.reportCacheMode = Stimulsoft.Report.StiReportCacheMode.On;
Stimulsoft.StiOptions.Engine.ReportCache.amountOfQuickAccessPages = 50; // default 50

report.renderAsync(() => {
    console.log("Pages: ", report.renderedPages.count);
    report.saveDocumentFile("Over-2.000-pages.mdc");
    report.dispose();
});
Setting reportCacheMode = On streams rendered pages to a cache instead of keeping them all in memory; amountOfQuickAccessPages controls how many stay readily available. Calling dispose() afterwards frees the resources — important for long-running Node.js services.

Используя этот сайт, вы соглашаетесь на использование файлов Cookie для аналитики и персонализированного контента. Файлы Cookie хранят полезную информацию на вашем компьютере, чтобы помочь нам повысить эффективность и удобство использования. Для получения дополнительной информации, пожалуйста, прочтите Конфиденциальность и Использование Cookie.