QorumLogs
QorumLogs copied to clipboard
QLManager performance issues
When you do big loops, like 10k for loops some line in here is lagging the whole code. I think it might be the file extensions.
for _ in 0..<10000 {
QL1(11111)
}
Did some tests:
Empty body: 3.99 e-06 sec 10k print(): 0.05 sec
10k ql1(): 0.45-0.61 sec 10k ql1(), with trackLogFunction: 0.9-1.5 sec
100 ql1: 0.025 sec 100 ql1, with trackLogFunction: 0.028-0.035 sec
Seems, its not bad unless you're using more than hundreds of logs every second. But there's definitely some room for improvements.
While the IDE is active most of the delay is coming from making the logs clickable: "Myclass.swift:338 " printing this part of the log.
Haven't checked what is delaying when IDE is inactive, ie running app without xcode plugged in. The timer tests in the previous posts are when IDE is inactive.