mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-24 22:15:41 +03:00
improve performance
see https://stackoverflow.com/questions/44334233/why-is-the-stringbuilder-chaining-pattern-sb-appendx-appendy-faster-than-reg/44338950
This commit is contained in:
parent
df25fb0478
commit
4305e9ccf8
1 changed files with 10 additions and 11 deletions
|
@ -1554,16 +1554,15 @@ public class CallController extends BaseController {
|
|||
|
||||
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
stringBuilder.append("{");
|
||||
stringBuilder.append("\"fn\":\"");
|
||||
stringBuilder.append(StringEscapeUtils.escapeJson(LoganSquare.serialize(ncMessageWrapper
|
||||
.getSignalingMessage()))).append("\"");
|
||||
stringBuilder.append(",");
|
||||
stringBuilder.append("\"sessionId\":");
|
||||
stringBuilder.append("\"").append(StringEscapeUtils.escapeJson(callSession)).append("\"");
|
||||
stringBuilder.append(",");
|
||||
stringBuilder.append("\"ev\":\"message\"");
|
||||
stringBuilder.append("}");
|
||||
stringBuilder.append("{")
|
||||
.append("\"fn\":\"")
|
||||
.append(StringEscapeUtils.escapeJson(LoganSquare.serialize(ncMessageWrapper.getSignalingMessage()))).append("\"")
|
||||
.append(",")
|
||||
.append("\"sessionId\":")
|
||||
.append("\"").append(StringEscapeUtils.escapeJson(callSession)).append("\"")
|
||||
.append(",")
|
||||
.append("\"ev\":\"message\"")
|
||||
.append("}");
|
||||
|
||||
List<String> strings = new ArrayList<>();
|
||||
String stringToSend = stringBuilder.toString();
|
||||
|
@ -1771,4 +1770,4 @@ public class CallController extends BaseController {
|
|||
showCallControls();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue