-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
macOS: lighttable scrolling nearly unusable and preview very slow since 3.2.1 #6068
Comments
multiple GPUs doesn’t help on osx macbook pro 16 since then the cpu graphic is prioritized over the GPU. for the swipe issue - it’s fine with an old fashioned mouse wheel but darktable and trackpad or magic mouse aren’t best friends - darktable is quite sensitive ... |
@MStraeten thanks a lot for your feedback. You got me, I was indeed using also a magic mouse for scrolling. Replacing it by a Logitech bluetooth mouse brought back scrolling via mouse wheel in a controlled way. I am still wondering, why it worked very well with mac's touchpad and magic mouse in 3.0.2 and stopped to do so in 3.2.1? I also tried your advice on enabling OpenCL with the suggested setting. Well, hard to say ... it might be slightly faster, but I still get the observed behaviour as described above. Again ... strange that it worked with 3.0.2 (even without OpenCL) and now is perceived much slower in 3.2.1 although the release notes suggest something different: "...lighttable view has been rewritten... resulting in large performance gains ..." . Site note: I am well aware of that Darktable is developed and optimized for Linux and we as Mac user's can consider us very lucky to also get a share of this beautiful application. But well, would be so great to also profit from these performance gains or at least preserve the speed of 3.0.2 in 3.2.X on macOS. I am really no expert but of course have some guess ... maybe for the performance optimization some GTK functions have been used that are not available or not effective on macOS or some compatibility options have been abandoned in favour of the performance gains? (which is all fine but would be interesting to understand) |
@apfelkraut I can reproduce this behaviour on a mbp with i7 + 32GB of ram + Radeon 555x. The latest updates have made darktable sadly very hard to use :( Is there anything I can provide to assist? Video of the issue or trace logs? I have already tried adding the suggested opencl settings. |
lot of different things in this issue... I have no access to any Mac, so I can just guess and ask...
now about the optimizations : in fact we now use "regular" gtk widgets instead of doing all the drawing ourselves, so imo that should increase compatibility, but things are not so bright apparently... thanks for your answers |
Thanks a lot @AlicVB for your interest, the questions, and the background!
|
I can confirm all the same information as @apfelkraut, with some additional information to point 2. In rendering previews the preview is slow to render as mentioned (2-3 seconds) per image. When it does load it appears to load a small copy offset in the corner, then a full size glitched in an incorrect location, and then finally it loads in the correct location/scale. So it creates a very choppy effect on the screen. After an image has been previewed once it's "faster" to load, but still not "instant" as I have observed in past versions. It seems like darktable isn't "looking ahead" to render future images in the series. Restarting darktable causes the rendering to reset as mentioned, which probably indicates that the in memory cache isn't being flushed to disk during runtime or at shutdown. I've noticed this problem in the past and I believe the work around was after a large import to run |
For the slowness, you can see where the thumbnail is grab from by launching dt with
yes, this is a know glitch which is almost fixed in current master
Can you verify that point with |
Ahh great, thanks!
Now that I'm trying to produce it I can't. I wonder if it was because I was at different zoom levels in the image viewer? That would certainly cause different mip maps to be generated all the time ... Trying out some stuff related to opencl, I can see that if I have the MBP on external displays to force the radeon, image preview generation is much faster, so I wonder if the darktable on macos needs to indicate that it wants to use the discrete GPU? When on the integrated card I can see the 3 second-ish image generation, but on discrete it's much faster, about 1 second with opencl. IIRC this a flag you can set in the plist. https://developer.apple.com/documentation/bundleresources/information_property_list/nssupportsautomaticgraphicsswitching Also I'm finding that the default cache generate tool mip level is too low. For @apfelkraut if you have a large batch to import, you could find the following helpful:
I find that the "large" previews tend to be mip level 3 or 4, and smaller thumnails are 0 or 1, so this should generate every thing you need at various display levels. Be aware that editing an image of course invalidates the pre generated content though. |
Wow ... thanks @Firstyear and @AlicVB. These are quite some hints! I did not have time to try the plist tweaking as described in the links. @Firstyear Do you have a working plist config to activate the discrete GPU even if you are not connected to an external monitor? @AlicVB regarding the caching question: In short - it seems that caching works as expected though the preview is still much slower in 3.2.1 compared to 3.0.2 . Note that compared to my previous report this was executed on a MacbookPro 13 (just as hint regarding the mimaps size). In addition the default darktable configuration was changed to also cache full previews. Steps to reproduce
3.0.2 behaviour
3.2.1 behaviour
By the way, probably not related, but when I start darktable from command line I see the following GTK related messages:
|
It took me a while but I realise that with the nssupportgpuswitch you also need an opengl context: https://developer.apple.com/library/archive/qa/qa1734/_index.html So this plist change doesn't have the effect you may want.
In activity monitor you can check your disk IO rates to see if that's a bottleneck here?
|
For now you could uncheck 'sysprefs > energy saver > automatic gpu switch' if you need the faster opencl devices. |
Hi All, Both are running 10.15.6.
However if I use a good ol' USB mouse that I have lying around for when my mouse batteries go flat right when I'm about to bid on an eBay auction (circa 1998) then the scrolling works fine! I have not tested earlier version of darktable as I just discovered it a few weeks ago and am looking for a replacement for Lightroom when my licensed copy stops working. So I can't comment on how this differs to the earlier version or the comparative speed of thumbnails, etc. There is definitely an issue with the Apple pointing devices, most likely a driver incompatibility. I hope this gets fixed in the next version as it really makes it unusable and the old mouse is way to clunky. Cheers. |
This issue did not get any activity in the past 30 days and will be closed in 365 days if no update occurs. Please check if the master branch has fixed it and report again or close the issue. |
I really like darktable, and have been using it for years now. Ok actually I found the performance always kinda borderline, but it was "good enough" and therefore working out for me. I'm using darktable on a 2018 MacBook Pro 13" (i5 2.3, 16GB RAM) together with a Radeon Vega 64 eGPU on a 4K display. Already tried some stuff from this post here, but didn't feel any improvement whatsoever. :-( |
Turning off trackpad scroll with inertia in System Preferences>Accessibility>Mouse & Trackpad>Trackpad Options improves the situation in LightTable. The Mac trackpad driver seems to be set to very high gain as far as DarkTable is concerned, mainly because it scrolls one "page" of images per swipe as opposed to smooth scroll ...there is also the option of turning on the scroll bar to help. Everything else seems to work ok on my Mid 2012 Macbook Pro. |
i tried turning off inertia for the mouse options, lowering the speed and disabling the spring loaded delay. Still quite unusable. I'm hopeful this is addressed in the next version of DT as it clearly behaves quite different to any other app on the Mac in this regard. |
@sblock23 : sorry to hear that; here I use the track-pad on my macbookpro and turning off the inertia made light-table scroll "in pages" like a bad browser window, not great admittedly, but I thought it was an improvement and it shows what needs changing codewise - I think using the scroll bar which works ok is however better - having noted all of that, I do agree something needs to be done ... I'm going to look for a (safer) older version in the meanwhile. It is ironic as I use RawTherapee on the mac (which runs very well), and I thought I'd give darktable a try when I find that the manual is completely different and then this happens to boot ... fingers crossed then. EDIT: can confirm that 3.0.2 is running well on my Macbook Pro, mid 2012, i7, 16 Gb, NVIDIA 650M 512 Mb, 1 Tb Samsung SSD and conforms to the manual. |
Scrolling behaviour change is most likely related to lighttable rewrite by @AlicVB. I think smooth scroll events (different from ordinary scrolls) are handled somehow wrongly. Though another possibility is that GTK is to blame and this issue was introduced in some recent version. |
yes, it's certainly a problem on my rewrite. Sadly, I have absolutely not clue of what happen, and I don't have a Mac to test... So it's quite difficult to figure how to solve that :( |
@AlicVB I am extremely grateful that we can have great great software like this for free mate, you did a fantastic job - so like, no worries and a big thank you. I'll try and see if I can recompile it myself at some point (IF I can understand how ;D). @parafin I agree - its the smooth scrolling being mangled by GTK on the Mac implementation. To be clear I don't think the GTK "smooth scrolling" works particularly well (without opencl) even when correctly running, I have RawTherapee running beside Darktable and like it scrolls its file manager quite a bit faster (out of the box) ... might be an idea to recompile the new code with an older GTK version and see what happens? e.g. the same version that is used on the 3.0.2 release if that be different ? |
I tested lighttable scrolling with the trackpad on my Macbook. GDK_SCROLL_SMOOTH deltas are around the range -500 to 500 on my system. I'm not exactly sure what it is. It seems that the numbers are in relation to display dimensions. This leads to dt_gui_get_scroll_unit_deltas() in gtk.c not handeling that properly and _event_scroll() in thumbtable.c moves thumbnails every time scroll event is updated. There is a similar issue in Beep6581/RawTherapee#5599.
The UX with a trackpad could possibly be improved by not forcing thumbnails to align at the top edge. I think having closer interaction between the finger movement and scrolling bahaviour gives better spatial awarenes. Otherwise when there are only few rows of thumbnails visible scrolling leads to thumbtable changing completely. I used following changes to test the interaction.
|
@Ihietal Hello there ! Season's greetings and thank you for updating the issue. What was the result of your test ? Does it make it run better ? |
I have very little coding experience so I would appreciate any opinions from @parafin. Scaling the input from event->delta_x and event->delta_y seems to produce nicer scrolling. I'm assuming that all GDK_SCROLL_SMOOTH events are similar on macOS. This change also affects other plases in the UI. For example resizing tagging and image info modules is much slower.
|
HI, I tried DT 3.4.0 on my iMac late 2015 (27 Inch), 3,2 GHz Intel Core i5 four cores, 16GB RAM, AMD Radeon R9 M390 2 GB with OpenCL on, with macOS 11.1 Big Sur. The scrolling issue using a magic mouse and Magic trackpad still happens on the main view (photo thumbnails). A swipe up down, left or right scroll "per page" or multiple page at once. However, swiping up / down on the left and right columns are smooth, scrolling in lists (keyword list for example) is also smooth. The problem only seems to be in the thumbnails view. EDIT:
|
I am really starting to like Darktable for all the other things it can do, but proper scroll behavior isn't one of them. It's really driving me nuts. :( I understand that possibly MacOS is not the main focus of this project, but then I'd assume any workaround such as #7904 is better than the current broken behavior, no? So, what's the plan on fixing this issue / getting the PR integrated? |
#7904 partially fixed this issue. |
Thank you all so much for the contributions on this one! Just updated to 3.4.1 and it made trackpads+wheel-less mouses usable again. Sweet! I would agree with @lhietal though that continuous scrolling would even be better for trackpad use (instead of scrolling row by row). Still, thanks much! |
If there are no objections, I would close this issue. Thanks a lot to everyone who contributed to resolving it!!
Verified on the same hardware that brought me to reporting this issue ... meanwhile running macOS 11. (Note to myself: Next time, open one issue per problem ;-)) |
The grid/lightbox view is impossibly slow on Linux (fc37.x86_64) with latest version 4.2 - using keyboard navigation -- unrelated to any mouse config & will not utilize available RAM when set to unrestricted. |
it doesn’t help to file that Linux issue in that osx thread. The issue described here was a very macOS specific issue. |
Environment
Steps to reproduce
Current behaviour (as in 3.2.1)
Expected behaviour (as in 3.0.2)
Further notes
Workaround
The text was updated successfully, but these errors were encountered: