Skip to content

Commit

Permalink
Massive performance boost
Browse files Browse the repository at this point in the history
  • Loading branch information
Mindgamesnl committed Jun 17, 2023
1 parent e1383ef commit 0d34097
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 13 deletions.
2 changes: 1 addition & 1 deletion client/public/metadata.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"buildMajor":1,"buildMinor":125,"buildRevision":37,"buildTag":"production","buildDate":"21:35:12 GMT+0200 (Central European Summer Time)","build":"1.125.37 production"}
{"buildMajor":1,"buildMinor":125,"buildRevision":38,"buildTag":"production","buildDate":"00:39:04 GMT+0200 (Central European Summer Time)","build":"1.125.38 production"}
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {VoiceModule} from "../../../voice/VoiceModule";
import {oalog} from "../../../../util/log";
import {debugLog} from "../../../debugging/DebugService";

export function HandleVoiceDrop(data) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import {VoiceModule} from "../../../voice/VoiceModule";
import {reportVital} from "../../../../util/vitalreporter";
import {StringifyError} from "../../../../util/errorreformat";
import {oalog} from "../../../../util/log";
import {debugLog} from "../../../debugging/DebugService";

export function HandleVoiceSubscription(data) {
Expand Down
13 changes: 4 additions & 9 deletions client/src/client/services/voice/peers/protocol.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,9 @@ export class RtcPacket {
}

trimmed() {
let headerLength = (this.eventName).length
let out = ""
for (let i = 0; i < this.original.length; i++) {
let byte = this.original.charAt(i);
if (!(i <= headerLength)) {
out += byte
}
}
return out;
const headerLength = this.eventName.length + 1;
const originalChars = Array.from(this.original);
const trimmedChars = originalChars.slice(headerLength);
return trimmedChars.join('');
}
}
2 changes: 1 addition & 1 deletion client/src/metadata.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"buildMajor":1,"buildMinor":125,"buildRevision":37,"buildTag":"production","buildDate":"21:35:12 GMT+0200 (Central European Summer Time)","build":"1.125.37 production"}
{"buildMajor":1,"buildMinor":125,"buildRevision":38,"buildTag":"production","buildDate":"00:39:04 GMT+0200 (Central European Summer Time)","build":"1.125.38 production"}

0 comments on commit 0d34097

Please sign in to comment.