https://bugs.kde.org/show_bug.cgi?id=448593

--- Comment #13 from 319513...@outlook.com <319513...@outlook.com> ---
Hi, I had do some changes at new brach:
https://github.com/cathaysia/digikamflowplugin/tree/data_loading

I use ManagedLoadSaveThread to loading images, it makes my codes more clear.
However, I can't get more performance. To be exact, my plugin become slower,
and eat more memory.

At the first case, I use threads by threadpool:
https://github.com/cathaysia/digikamflowplugin/blob/27f3d310e5dc22a7aab28f771cf8ce0236734f31/src/PicFlowView.cpp#L205

and a thread deal 3 QPixmap: 
https://github.com/cathaysia/digikamflowplugin/blob/27f3d310e5dc22a7aab28f771cf8ce0236734f31/src/PicFlowView.cpp#L208

For the second, I scale images when it's size beyond 1920x1080:
https://github.com/cathaysia/digikamflowplugin/blob/27f3d310e5dc22a7aab28f771cf8ce0236734f31/src/PicFlowView.cpp#L187

Because all cpu works be done in sub-threads, so it's quickly.

But when I use ManagedLoadSaveThread, what can I do seems just: 

1. use LoadingModeShared:
https://github.com/cathaysia/digikamflowplugin/blob/f5e575639341dbc6656740bc90f7016739c64eb9/src/picdialog.hpp#L38
2. use PreviewSettings::fastPreview() :
https://github.com/cathaysia/digikamflowplugin/blob/f5e575639341dbc6656740bc90f7016739c64eb9/src/picdialog.cpp#L61

But both them can't obtain  significant profit.

If you try plugins that compiled by two branchs, you will find master branch
better than data_loading branch.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to