ipc: remove queue... it adds osc latency
This commit is contained in:
parent
547f66a2a2
commit
f39e5f58ae
2 changed files with 1 additions and 21 deletions
|
|
@ -20,8 +20,6 @@ Sessions saved with this version will not be readable with older versions (old s
|
|||
- the root panel is now saved as a special `panel` widget (which means it has savable options)
|
||||
- custom module
|
||||
- add access to the app's `settings` object
|
||||
- misc
|
||||
- ui performance optimizations (queued clients <> server communcation)
|
||||
|
||||
## 0.17.8
|
||||
|
||||
|
|
|
|||
|
|
@ -6,32 +6,14 @@ var Ipc = class Ipc {
|
|||
|
||||
constructor() {
|
||||
|
||||
this.queue = []
|
||||
this.socket = io.connect('/', {parser:customParser})
|
||||
|
||||
setInterval(this.flush.bind(this), 5)
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
flush() {
|
||||
|
||||
if (this.queue.length) {
|
||||
|
||||
for (let msg of this.queue) {
|
||||
|
||||
this.socket.emit(...msg)
|
||||
}
|
||||
this.queue = []
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
send() {
|
||||
|
||||
this.queue.push(arguments)
|
||||
this.socket.emit(...arguments)
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue