Patch test

Andrey Kamakin a.kamakin at icloud.com
Mon Jul 2 16:16:32 UTC 2018


Hi, all!

I have implemented lock free hash table for storing tiles instead of blocking one.

What is it and why it is needed?
===================

As any other programm, Krita uses threads to speed up code execution, but there are places where resources synchronization is needed, mainly using locks. So lock free is, as name states, without using any locks to read/write data and threads are not sleeping on locks.

This new feature will speed up Krita on multicore systems.


What it does?
========

Its workflow is simple, tiles are added into map and read when needed. All happens concurrently, without threads waiting on locks.


Configuration options
=============

There is a cmake switch which is named "USE_LOCK_FREE_HASH_TABLE". By default it is OFF, and if you wanna try it out, then change it for ON.


How to test?
=======

the feature is in master now, so you will hae to pull it, turn option on and recompile Krita.


Test plan
======

Make sure USE_LOCK_FREE_HASH_TABLE is ON. And i guess you'll have to detect some changes on canvas, maybe dropped tiles or something like that. Dirty reads/writes or simple memory failures didn't happen so far, but who knows what can happen on your machine.

Any help/advices are welcome :)
-- 
Andrey Kamakin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kimageshop/attachments/20180702/cd12f741/attachment.html>


More information about the kimageshop mailing list