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

Extremely slow slicing - further optimisation possible? #331

Closed
aquatacizem opened this issue Sep 26, 2022 · 5 comments
Closed

Extremely slow slicing - further optimisation possible? #331

aquatacizem opened this issue Sep 26, 2022 · 5 comments
Assignees
Labels
enhancement optimize for some feature or user interface

Comments

@aquatacizem
Copy link

A major issue I've been struggling with in Bambu Studio is that slicing certain files with complex, detailed paths takes many times longer than either PrusaSlicer or SuperSlicer.

Bambu Studio really struggles to generate the gcode, if it can even generate it at all. Some files I work with will not move past 5% even after 24 hours. Bambu Slicer does not freeze or crash and is still actively processing, but with seemingly no progress.

If it is helpful, I have attached a mock-up model I created as stress test. In PrusaSlicer, it took around 14 minutes to slice. In Bambu Studio it took around 40 minutes.

It would be really great if slicing times were able to be further optimised. Thank you!
Slicer Stress Test.zip

@YifanWuBambu YifanWuBambu added the enhancement optimize for some feature or user interface label Sep 28, 2022
@SaltWei
Copy link
Collaborator

SaltWei commented Oct 9, 2022

I think this is caused by different enabled settings.

@SaltWei
Copy link
Collaborator

SaltWei commented Oct 9, 2022

Bambu Studio always enable “Detect bridging perimeter” and also enhance this setting to calculate the overhang degree for every segment part of perimeter, not only detect bridging perimeter. This is useful and necessary for slow overhang down feature. You can see this feature in Speed page of BambuStudio.

screenshot-20221009-170246

Since Bambu Studio always enable “Detect bridging perimeter” in code, user can't disable this option. I disable this option in code and slicing is much faster.

Another option to make gcode generation to be slow is "Reduce infill retraction" which is same and named as “Only retract when crossing perimeters” in prusa. BambuStudio always enable this option, but prusa is not. Enabling this option can reduce a lot of printing time but make gcode generation slower.

This is my full analysis for this issue.

Conclusion:
1 Option “Detect bridging perimeter” is enhanced and make slicing slower than Prusa, but it's hidden and can't be disabled by user.
2 Option "Reduce infill retraction" is always enabled in BambuStudio but Prusa is not. This can be disabled by user.

So the next work is try to optimize the speed related to these two options, but I have no idea currently because a lot of 2D geometry calculation related to clipper lib need to be investigated when model is complex.

@SaltWei
Copy link
Collaborator

SaltWei commented Oct 9, 2022

OK. We find one "solution" for "Conclusion 1". When the model has no overhangs, for example, the model you shared above, user can disable "slow down for overhang". Then Bambu Studio is unnecessary to calculate overhang degree of every segment of perimeter. This is one point to optimize.

I locally write the code. And disable "slow down for overhang" and "Reduce infill retraction". Re-slice again and time cost is less than 5 minutes, which is much faster than enabling these two options. Prusa Slicer is also same time on my computer.

At least, now we can manually disable these two options to make settings to be same with prusa, and time cost to be close as well.

Will push the patch.

The final optimization is make slicing to be fast even when enable these two options. Not easy to investigate 2D geometry calculation related to clipper lib but we will keep on it.

@aquatacizem
Copy link
Author

Fantastic! Your time and work is much appreciated. Thank you!

lanewei120 pushed a commit that referenced this issue Oct 20, 2022
When the model has no overhang, user may disable overhang
slowing down.
In this case, it's unnecessary to calculate overhang
degree which make slicing slow when model is complex.

This is improvement for github issue #331.

Signed-off-by: salt.wei <salt.wei@bambulab.com>
Change-Id: I2eaeca3ee4068f76709fe97535bbf05c0d27c062
lanewei120 pushed a commit that referenced this issue Oct 20, 2022
When the model has no overhang, user may disable overhang
slowing down.
In this case, it's unnecessary to calculate overhang
degree which make slicing slow when model is complex.

This is improvement for github issue #331.

Signed-off-by: salt.wei <salt.wei@bambulab.com>
Change-Id: I2eaeca3ee4068f76709fe97535bbf05c0d27c062
@SaltWei SaltWei removed their assignment Apr 6, 2023
@SaltWei
Copy link
Collaborator

SaltWei commented Apr 18, 2023

https://github.com/bambulab/BambuStudio/releases/tag/v01.06.00.65 has improved the slicing speed a lot for this model even with overhang-slow-sown enabled

@SaltWei SaltWei closed this as completed Apr 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement optimize for some feature or user interface
Projects
None yet
Development

No branches or pull requests

4 participants