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

Fix for slow file opening #19025

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

gtollini
Copy link

@gtollini gtollini commented May 6, 2024

Description

This fixes #16249 .

After looking at my logs (pretty much identical to this), I decided to take a deeper look into the code. As it turns out, 32 tty ports were being tested, 4 at a time, with 15s timeout, twice each. This would give me an expected wait of 32 * 15 * 2 / 4 = 240s of wait, or about 4 minutes. My logs actually match this expected time, so it took Cura 4 minutes between me selecting a file to open and it actually opening on Cura.

Ideally, this wouldn't be a hard-coded True. But I'm not that familiar with Qt - or the Cura project as a whole - so I wouldn't know the best way to handle this. Some suggestions are:

  • Add a boolean to the configurations, something like "Auto Detect Serial Ports" or "Auto Detect Baud Rates". And please, make the default False.
  • Instead of scanning for tty ports and trying every baud rate, have the user supply this data.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

I had the same problem as listed on #16249. After building with the new source code, it opened files quickly - as expected.

Checklist:

@kafufafu
Copy link

kafufafu commented Jun 5, 2024

Could this have had any relation with the following? #19186

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: Community Contribution 👑 Community Contribution PR's
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to open any .stl files at all.
3 participants