dtable-statistic 5.0.48-alpha.12 → 5.0.48-alpha.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/es/index.js CHANGED
@@ -76,7 +76,6 @@ class Statistic {
76
76
  if (!window.app) return;
77
77
  _resultCacheManager.viewRowsCacheManager.clear();
78
78
  _resultCacheManager.formulaResultsCacheManager.clear();
79
- console.log('unmount');
80
79
  window.app.unmountWidget({
81
80
  animation
82
81
  });
@@ -6,7 +6,13 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.default = void 0;
7
7
  class ThreadManager {
8
8
  constructor(threadCount) {
9
- this.threadCount = navigator.hardwareConcurrency || 4;
9
+ const supportedThreads = navigator.hardwareConcurrency;
10
+ // prevent the browser from freezing by leaving 3 threads for the main thread
11
+ if (typeof supportedThreads === 'number' && supportedThreads - 3 > 0) {
12
+ this.threadCount = supportedThreads - 3;
13
+ } else {
14
+ this.threadCount = 2;
15
+ }
10
16
  this.threadList = [];
11
17
  this.queue = [];
12
18
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dtable-statistic",
3
- "version": "5.0.48-alpha.12",
3
+ "version": "5.0.48-alpha.13",
4
4
  "description": "statistics",
5
5
  "main": "dist/dtable-statistic.js",
6
6
  "author": "seafile",
@@ -18,7 +18,7 @@
18
18
  "react-grid-layout": "^1.2.5",
19
19
  "react-intl-universal": "^2.4.8",
20
20
  "reactstrap": "8.9.0",
21
- "sea-chart": "^0.0.95-alpha.6"
21
+ "sea-chart": "0.0.95-alpha.6"
22
22
  },
23
23
  "peerDependencies": {
24
24
  "dtable-ui-component": "~5.0.*",