pinokiod 3.6.29 → 3.6.31

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.
@@ -568,9 +568,13 @@ class Api {
568
568
  }
569
569
  async step (request, rawrpc, input, i, total, args) {
570
570
 
571
- await this.init()
571
+ await Promise.all([this.init, this.kernel.update_sysinfo])
572
572
 
573
- await this.kernel.update_sysinfo()
573
+ // await this.init()
574
+ //
575
+ // console.time("api.update_sysinfo")
576
+ // await this.kernel.update_sysinfo()
577
+ // console.timeEnd("api.update_sysinfo")
574
578
 
575
579
  // clear global regular expression object RegExp.lastMatch (memory leak prevention)
576
580
  let r = /\s*/g.exec("");
@@ -1163,7 +1167,9 @@ class Api {
1163
1167
  // this.kernel.keys = (await this.loader.load(keypath)).resolved
1164
1168
 
1165
1169
  // init shell before running just to make sure the environment variables are fresh
1170
+ console.time("shell.init")
1166
1171
  await this.kernel.shell.init()
1172
+ console.timeEnd("shell.init")
1167
1173
 
1168
1174
  if (request.uri){
1169
1175
  this.counter++;
package/kernel/index.js CHANGED
@@ -580,7 +580,9 @@ class Kernel {
580
580
  },
581
581
  })
582
582
  this.sys = new Sysinfo()
583
+ console.time("sys init")
583
584
  await this.sys.init(this)
585
+ console.timeEnd("sys init")
584
586
  let info = this.sys.info
585
587
 
586
588
  this.sysinfo = info
package/kernel/sysinfo.js CHANGED
@@ -5,24 +5,34 @@ class Sysinfo {
5
5
  async init(kernel) {
6
6
  this.kernel = kernel
7
7
  this.info = {}
8
- await this.static()
9
- await this.refresh()
8
+ await Promise.all([this.static, this.refresh])
9
+ // await this.static()
10
+ // await this.refresh()
10
11
  }
11
12
  async static() {
12
- await this.gpus()
13
- await this.system()
14
- await this.cpu()
15
- await this.os()
16
- await this.audio()
17
- await this.env()
13
+ await Promise.all([this.gpus, this.system, this.cpu, this.os, this.audio, this.env])
14
+ // await this.gpus()
15
+ // await this.system()
16
+ // await this.cpu()
17
+ // await this.os()
18
+ // await this.audio()
19
+ // await this.env()
20
+
21
+
18
22
  // await this.disk()
19
23
  }
20
24
  async refresh() {
21
25
  // await this.time()
22
- await this.memory()
23
- await this.battery()
24
- await this.proc()
25
- await this.bluetooth()
26
+
27
+
28
+ await Promise.all([this.memory, this.battery, this.proc, this.bluetooth])
29
+ // await this.memory()
30
+ // await this.battery()
31
+ // await this.proc()
32
+ // await this.bluetooth()
33
+ //
34
+
35
+
26
36
  // await this.net()
27
37
  }
28
38
  async gpus() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "3.6.29",
3
+ "version": "3.6.31",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {