QorumLogs icon indicating copy to clipboard operation
QorumLogs copied to clipboard

QLManager performance issues

Open Esqarrouth opened this issue 7 years ago • 2 comments

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)
   }

Esqarrouth avatar Aug 06 '16 15:08 Esqarrouth

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.

Esqarrouth avatar Oct 11 '16 12:10 Esqarrouth

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.

Esqarrouth avatar Oct 11 '16 12:10 Esqarrouth