Skip to content
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

Appimage UX: Very long loading times of some Themes in AppImage #302

Open
2 tasks done
MiqCG opened this issue Jun 28, 2024 · 45 comments
Open
2 tasks done

Appimage UX: Very long loading times of some Themes in AppImage #302

MiqCG opened this issue Jun 28, 2024 · 45 comments

Comments

@MiqCG
Copy link

MiqCG commented Jun 28, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Problem description

When in Light theme, shortcut for new file (Control + n) and others (Alt + f , Alt + e) don't work. If new file is created throw File menu with the mouse, then they work (see indications in the bottom part of the screencast).
I think there is the same problem with revision 37841 and 37543.
In some situations, clicking with the mouse on the menu bar doesn't work either.
On the other hand, looks like loading/activating the Light theme is much much slower than Classic theme, as you can see in the attached video.

I have searched in Github for [is:issue light theme shortcut] and [is:issue light theme new file] with no relevant results

Full version info

OS: Devuan GNU/Linux 5 (daedalus) (XFCE/xfce)
Word size of FreeCAD: 64-bit
Version: 0.22.0dev.37898 (Git) AppImage
Build type: Release
Branch: main
Hash: 308013fb975ec3bf0dc5cb616ef76a4095e71cc5
Python 3.11.9, Qt 5.15.13, Coin 4.0.2, Vtk 9.2.6, OCC 7.7.2
Locale: Catalan/Spain (ca_ES)
Installed mods: 
  * Movie 2024.2.15
  * sheetmetal 0.4.20
  * FreeCAD-motion-workbench-master
  * dodo 1.0.1
  * PieMenu 1.2.7
  * BillOfMaterials 0.0.8.5
  * fasteners 0.5.24

Subproject(s) affected?

Core

Anything else?

Light_theme.mp4

Code of Conduct

  • I agree to follow this project's Code of Conduct
@maxwxyz
Copy link
Collaborator

maxwxyz commented Jun 29, 2024

@MisterMakerNL FYI

@MiqCG
Copy link
Author

MiqCG commented Jun 29, 2024

I thought it was not happening in revision 37543 but it is. I edited the first post.
And is happening with "Dark behave" and "Dark theme" themes too.

@MiqCG
Copy link
Author

MiqCG commented Jun 29, 2024

Same behaviour in revision 37298.
Maybe it's not that keyboard shortcuts are not working but the times/speed of loading of this themes that prevent FreeCAD to obey. The theme is apparently loaded after long time but maybe it is not totally loaded and cannot accept those orders. Don't know.

When you confirm me this hypothesis, I can change the title of the issue.

Loading_times_37928:

Loading_times_37928.mp4

Loading_times_37898:

Loading_times_37898.mp4

@maxwxyz
Copy link
Collaborator

maxwxyz commented Jun 29, 2024

@kadet1090 FYI

@MisterMakerNL
Copy link

I cannot reproduce this in windows with my own build.

@Syres916
Copy link
Contributor

For me this needs to be proven whether it's a distro specific issue, an actual FreeCAD code (which is now looking less likely) issue or a Conda packaging issue. As the OP's distro is originally based on Bookworm and I already have a Bookworm VM, I'll try that first.

If needed I'll then build and attempt to compile on a VM of Devuan GNU/Linux 5 (daedalus) (XFCE/xfce).

@Syres916
Copy link
Contributor

Could not reproduce the reported issue using Bookworm:

OS: Debian GNU/Linux 12 (bookworm) (X-Cinnamon/cinnamon)
Word size of FreeCAD: 64-bit
Version: 0.22.0dev.37931 (Git)
Build type: Release
Branch: main
Hash: f28394a376c285725abdacee3d72bd57a8b196aa
Python 3.11.2, Qt 5.15.8, Coin 4.0.0, Vtk 9.1.0, OCC 7.6.3
Locale: English/United Kingdom (en_GB)
Installed mods: 
  * sheetmetal 0.4.13
  * CfdOF 1.25.16
  * Assembly4 0.50.12

@Syres916
Copy link
Contributor

Can reproduce the reported issue using AppImage on Bookworm, going from Dark behave to Light theme is like watching paint dry and I can get it to raise FreeCAD 0.22dev is not responding Force Quit/Wait messagebox but the other way round is acceptable.

OS: Debian GNU/Linux 12 (bookworm) (X-Cinnamon/cinnamon)
Word size of FreeCAD: 64-bit
Version: 0.22.0dev.37928 (Git) AppImage
Build type: Release
Branch: main
Hash: e7699b531eba4bee262f7214699f07b96f66ba7b
Python 3.11.9, Qt 5.15.13, Coin 4.0.2, Vtk 9.2.6, OCC 7.7.2
Locale: English/United Kingdom (en_GB)
Installed mods: 
  * sheetmetal 0.4.13
  * CfdOF 1.25.16
  * Assembly4 0.50.12

I have an older AppImage build 37302 which I'll have to extract and change the stylesheets over but that still won't prove if it's a Conda dependency that's changed, it really needs someone who can compile on Conda IMHO.

@MisterMakerNL
Copy link

Last lag issues where cause by switching Qstyle. But I also see issues with pixmap generation.
And third the biggest difference between behave and others is probably the use of custom colors not sure if those cause extended load times.

@Syres916
Copy link
Contributor

@MiqCG could you please change the title of the issue to specifically mention applies to the AppImage specifically.

@MisterMakerNL with the AppImage extracted it's absolutely acceptable so it doesn't seem to be a code or stylesheet issue, it's only with the AppImage in it's original state that the time to change is six to seven times longer.
Post release will probably need some more thought as to whether like the Templates for Techdraw they are copied out to the user's Shared folder on the first run or some other left field solution.

@MiqCG MiqCG changed the title Shortcuts don't work temporarily with Light theme Very long loading times of some Themes in AppImage Jun 30, 2024
@MiqCG
Copy link
Author

MiqCG commented Jun 30, 2024

@Syres916 , what about "Very long loading times of some Themes in AppImage"?

@Syres916
Copy link
Contributor

Absolutely fine, thanks.

@kinghat
Copy link

kinghat commented Jul 2, 2024

ive been having terrible freezes with the appimage weeklies for at least a couple months now. here you can see it using only the classic theme selection from start after deleting the freecad .cache/.config/share dirs. so it has a fresh state. it also took like 15s to start(after the loading screen):

Screencast_20240702_144457.webm

OS: Fedora Linux 40 (KDE Plasma) (KDE/plasma)
Word size of FreeCAD: 64-bit
Version: 0.22.0dev.38001 (Git) AppImage
Build type: Release
Branch: main
Hash: 1fc6da959b936a2999774a4fe5b4c4b12bf6ac8d
Python 3.11.9, Qt 5.15.13, Coin 4.0.2, Vtk 9.2.6, OCC 7.7.2
Locale: English/United States (en_US)

Operating System: Fedora Linux 40
KDE Plasma Version: 6.1.1
KDE Frameworks Version: 6.3.0
Qt Version: 6.7.1
Kernel Version: 6.9.6-200.fc40.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 4 × Intel® Core™ i7-5600U CPU @ 2.60GHz
Memory: 11.6 GiB of RAM
Graphics Processor: Mesa Intel® HD Graphics 5500

@JigglyBuff-Kun
Copy link

I have the same issue mentioned as above. UI freezes for x seconds for every operation that is being done in FC. Sometimes It works, and I am able to do two operations. But sometimes just clicking on Create Parametric part in the start page freezes the UI for a good amount of time.
FC starts with a warning (qt.qpa.plugin) Could not find the Qt platform plugin "wayland" in ""
The issue goes way when I use X. This is Wayland specific I guess.

OS: Arch Linux (KDE/plasma)
Word size of FreeCAD: 64-bit
Version: 0.22.0dev.38079 (Git) AppImage
Build type: Release
Branch: main
Hash: de508e437d13e7eb35baffceea496fb9107888cb
Python 3.11.9, Qt 5.15.13, Coin 4.0.2, Vtk 9.2.6, OCC 7.7.2
Locale: English/United States (en_US)

Operating System: Arch Linux 
KDE Plasma Version: 6.1.2
KDE Frameworks Version: 6.3.0
Qt Version: 6.7.2
Kernel Version: 6.9.8-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 24 × 12th Gen Intel® Core™ i9-12900K
Memory: 31.1 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 770

@MisterMakerNL
Copy link

should be fixed

@kinghat
Copy link

kinghat commented Jul 22, 2024

should be fixed

then the appimage freezes im having are unrelated as they continue as of:

OS: Fedora Linux 40 (KDE Plasma) (KDE/plasma)
Word size of FreeCAD: 64-bit
Version: 0.22.0dev.38261 (Git) AppImage
Build type: Release
Branch: main
Hash: 51789ae8a1a0b1ed20317eaedcd190baac734e3d
Python 3.11.9, Qt 5.15.13, Coin 4.0.2, Vtk 9.2.6, OCC 7.7.2
Locale: English/United States (en_US)
Installed mods:

  • OpenTheme 2024.7.3
  • fasteners 0.5.24
  • lattice2 1.0.0

@kadet1090
Copy link
Member

@kinghat does it happen in any particular scenario?

@kinghat
Copy link

kinghat commented Jul 30, 2024

@kinghat does it happen in any particular scenario?

its basically every interaction with the ui as shown in this video: #302

if i logout and back into my user session, before i run any other apps, i can sometimes get it to load and run without issues until i close it and open it again later on.

@MisterMakerNL
Copy link

MisterMakerNL commented Jul 30, 2024

I btw see you have opentheme, there was a bug in opentheme where the qtstyle script kept doing it thing causing lag.
Have you updated Opentheme?

@kinghat
Copy link

kinghat commented Jul 30, 2024

I btw see you have opentheme, there was a bug in opentheme where the qtstyle script kept doing it thing causing lag. Have you updated Opentheme?

in freecad ive been running the most up 2 date of everything. most recent addons/themes/dev builds. also fedora which is basically the most up 2 date of everything kde as well. theres a post on the forum: https://forum.freecad.org/viewtopic.php?t=87325 where other kde people are having the exact same issue.

@luzpaz
Copy link
Collaborator

luzpaz commented Jul 30, 2024

Is this specific to KDE ?

@kinghat
Copy link

kinghat commented Jul 31, 2024

Is this specific to KDE ?

i believe so.

@MiqCG
Copy link
Author

MiqCG commented Jul 31, 2024

Keeps happening with revision 38334 in an updated Linux Devuan 5 XFCE desktop.
Classic loads the faster, in 2-4 seconds aprox
Dark (from Classic) loads in 9-22 s aprox
Light (from Dark) loads in 14-27 s aprox

@luzpaz
Copy link
Collaborator

luzpaz commented Aug 1, 2024

@MiqCG can you please add the full About info to your post? TIA
You are using XFCE and not KDE, correct ?

@kinghat
Copy link

kinghat commented Aug 1, 2024

as mentioned above, my and others issues might not be the same as this. ours is constant freezing on every action in the ui and not just at load.

@MiqCG
Copy link
Author

MiqCG commented Aug 5, 2024

OS: Devuan GNU/Linux 5 (daedalus) (XFCE/xfce)
Word size of FreeCAD: 64-bit
Version: 0.22.0dev.38334 (Git) AppImage
Build type: Release
Branch: main
Hash: 61c964caa9a7e5bbc7a8d5f7d8914505d365113e
Python 3.11.9, Qt 5.15.13, Coin 4.0.2, Vtk 9.2.6, OCC 7.7.2
Locale: Catalan/Spain (ca_ES)

@JigglyBuff-Kun
Copy link

This is fixed when you run as X on KDE. This is KDE issue on wayland.

@kinghat
Copy link

kinghat commented Aug 14, 2024

This is fixed when you run as X on KDE. This is KDE issue on wayland.

this is a freecad appimage(afaik as theres no dev flatpak builds) issue on kde wayland. none of my other apps have this problem.

@JigglyBuff-Kun
Copy link

Yeah, that's true. This is why need beta flatpak builds. I am running X to get FC working.

@kadet1090 kadet1090 removed their assignment Aug 30, 2024
@chennes
Copy link
Member

chennes commented Aug 31, 2024

@maxwxyz should this get transferred to the Bundle repo? It sound from the above discussion like it's a purely appimage problem, with pretty specific parameters. I'd also suggest that on that basis it's not a release blocker.

@luzpaz
Copy link
Collaborator

luzpaz commented Sep 26, 2024

This is a first impression UX issue and frankly kind of embarrassing if we release 1.0 with it still open. The wait time is misleading and people think FC has crashed since there is no visual indication that the operation is ongoing.

@luzpaz
Copy link
Collaborator

luzpaz commented Sep 26, 2024

@probonopd any chance you could help troubleshoot the delay ?

@luzpaz luzpaz changed the title Very long loading times of some Themes in AppImage Appimage UX: Very long loading times of some Themes in AppImage Sep 26, 2024
@MisterMakerNL
Copy link

Can we check if it is the preference pack or the stylesheet. And if the stylesheet, can we check if it is the overlay stylesheet or the normal one or maybe both?

@luzpaz
Copy link
Collaborator

luzpaz commented Sep 26, 2024

@MisterMakerNL It's a vanilla install for me so no preference packs enabled. These are the bundled themes/stylesheets that come installed.

I'll check if overlay is enabled. I don't think it is enabled by default on vanilla installs, right ?

@Syres916
Copy link
Contributor

@MisterMakerNL this testing was carried out using build 38827 AppImage, extracting and then repacking the AppImage after each change to the FreeCAD Dark.cfg to only load what I required at each stage. Here are my findings and to be honest as I expected:

Change Requested Time To complete Change
Preference Pack Only 4.02 seconds
Pref Pack + Stylesheet Only 16.36 seconds
Pref Pack + Overlay Only 6.45 seconds
Pref Pack + Stylesheet & Overlay 33.75 seconds

@MisterMakerNL
Copy link

Do you check if the latest stylesheet are installed, or are you doing a fresh install? I have had issues where it didn't overwrite the older stylesheets?

@Syres916
Copy link
Contributor

My testing was with no existing user.cfg/system.cfg/FreeCAD.conf config files and only using the stylesheets provided in the AppImage, no other stylesheets/addons were involved. It's quite clear that the more lines of text in any of the cfg or qss files makes the changeover longer, as simple as that IMHO. It's basically 5.5 times slower as a packed AppImage versus an extracted one.

@MisterMakerNL
Copy link

But we are talking about files less then 80Kb that should needn't need 30 second load time...
Normally how I trouble should these issues is just delete half of the stylesheet, then test. if still long load times delete again half, and so keep going until I found the issue.
This is how I last time found Qwidget be the cause of the loading issues.

@probonopd
Copy link
Collaborator

Does this happen only on KDE Plasma on Wayland? Then it might be related to AppImage/AppImageKit#1351, the root cause of which is still unknown.

Can it be confirmed that the slowdown doesn't happen if one runs with --appimage-extract-and-run?

@Syres916
Copy link
Contributor

Does this happen only on KDE Plasma on Wayland?

Nope, I used OS: Debian GNU/Linux 12 (bookworm) (X-Cinnamon/cinnamon) for the above testing

Can it be confirmed that the slowdown doesn't happen if one runs with --appimage-extract-and-run?

I'll report back when my box is freed up from compiling.

@Syres916
Copy link
Contributor

@probonopd using --appimage-extract-and-run it takes 7.4 seconds instead of 33.75 seconds

@probonopd
Copy link
Collaborator

Is this on Wayland? If so, can you try on Xorg?

@Syres916
Copy link
Contributor

I thought the information above was clear that it's not on Wayland it's X-Cinnamon

@probonopd
Copy link
Collaborator

probonopd commented Sep 28, 2024

OK, then I don't have a hypothesis at the moment. Might be worth to experiment with different compression algorithms (we want to standardize on zstandard) and compression levels.

@kinghat
Copy link

kinghat commented Sep 28, 2024

Does this happen only on KDE Plasma on Wayland? Then it might be related to AppImage/AppImageKit#1351, the root cause of which is still unknown.

Can it be confirmed that the slowdown doesn't happen if one runs with --appimage-extract-and-run?

think this is fixed here: https://bugs.kde.org/show_bug.cgi?id=492584 my freecad freezing issues are not this one. also not sold on themes being the issue either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants