本帖最后由 Ellia.Duan 于 2024-10-30 14:50 编辑
您好,重新修改了您的html文件,且将版本更新为最新版17.1.8。
代码调整如下:
- function loadSpread1() {
- return new Promise((resolve, reject) => {
- window.fn(window.excel1);
- console.log('加载1')
- });
- }
- function loadSpread2(i) {
- return new Promise((resolve, reject) => {
- window.sheet = null;
- window.spread.destroy();
- window.spread = null;
- console.log('销毁2', i)
- window.fn(window.excel2)
- console.log('加载2', i)
- });
- }
- function loadSpread3() {
- return new Promise((resolve, reject) => {
- window.sheet = null;
- window.spread.destroy();
- window.spread = null;
- console.log('销毁3')
- });
- }
- let list = [], num = 500
- for (let i = 0; i < num; i++) {
- if (i == 0) {
- list.push(loadSpread1())
- } else if (i == num - 1) {
- list.push(loadSpread3())
- }
- else {
- list.push(loadSpread2(i))
- }
- }
- Promise.all(list).then(() => {
- console.log("finish");
- });
- }
复制代码 在此基础上,修改num的值分别为10,100,500 ,观察memory变化。 分别对应memory大概为100M , 300M , 1000M 。
我将深入调研此问题。调研编号:SJS-27082
|
|