Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Kate Kate
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 26
    • Issues 26
    • List
    • Boards
    • Service Desk
    • Milestones
  • Bugzilla
    • Bugzilla
  • Merge requests 4
    • Merge requests 4
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • UtilitiesUtilities
  • KateKate
  • Merge requests
  • !211

improve threading

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Christoph Cullmann requested to merge work/improve_threading into master Jan 29, 2021
  • Overview 12
  • Commits 3
  • Pipelines 0
  • Changes 4
  1. use a worklist approach => better spreading of search work
  2. use idea thread count for number of runnables => higher parallelism
  3. avoid that the QRegularExpression is shared between threads (without this, e.g. 16 vs. 2 threads is no real difference)
  4. deactive qmimedb atm => creates QRegularExpression internally => leads to same locking hell :/

with this, in a linux.git clone, searching for Linus takes:

  1. with 2 threads: ~4.5 seconds
  2. with 16 threads: ~0.5 seconds :P

I would call that "blazing xxxxxxx fast".

@dhaumann @waqar @sars

We need a workaround for the mimedb, it makes it useless, then you are back to multiple seconds.

Btw., perf did show the locking mess.

Really just without the

m_regExp(regexp.pattern(), regexp.patternOptions()) // we WANT to kill the sharing, ELSE WE LOCK US DEAD!

line, you can't really get any benefit over the 2 threads, even on my 16 core machine (with a SSD fast as hell).

Edited Jan 29, 2021 by Christoph Cullmann
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: work/improve_threading