Optimize LoadJob::onNewEntry
ClosedPublic

Authored by nicolasfella on Jan 2 2020, 12:37 AM.

Details

Summary

Same observation and resolution as in D25565

Test Plan

Verified performance gain with hotspot

Diff Detail

Repository
R36 Ark
Branch
opti2
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 20518
Build 20536: arc lint + arc unit
nicolasfella created this revision.Jan 2 2020, 12:37 AM
Restricted Application added a project: Ark. · View Herald TranscriptJan 2 2020, 12:37 AM
Restricted Application added a subscriber: kde-utils-devel. · View Herald Transcript
nicolasfella requested review of this revision.Jan 2 2020, 12:37 AM
dakon added a subscriber: dakon.Jan 2 2020, 11:34 AM

This expression is different from the other one in that it has no choice on it, so I wonder if a simple startsWith(QLatin1String("./")) isn't enough here.

rthomsen added a subscriber: rthomsen.

Please change this to use QString::StartsWith() as per dakon's comment so we can get this committed.

rthomsen requested changes to this revision.Apr 12 2020, 2:37 PM
This revision now requires changes to proceed.Apr 12 2020, 2:37 PM

Use startsWith

rthomsen requested changes to this revision.Apr 12 2020, 4:23 PM
rthomsen added inline comments.
kerfuffle/jobs.cpp
36

This can be removed now.

323–324

QLatin1String is more efficient than QStringLiteral in this case, right?

This revision now requires changes to proceed.Apr 12 2020, 4:23 PM
  • Address feedback
rthomsen accepted this revision.Apr 12 2020, 6:40 PM

Great. This reduces the loading time to almost half for a large zip archive.

This revision is now accepted and ready to land.Apr 12 2020, 6:40 PM
This revision was automatically updated to reflect the committed changes.