How to deal with big files
- knipknap
- Offline
- Premium Member
Less
More
- Posts: 88
- Thank you received: 5
22 Jun 2023 10:46 #274035
by knipknap
How to deal with big files was created by knipknap
As found discussed in some posts in this forum, the LinuxCNC user interface seems to do linear search in GCode somewhere, and thus gets exponentially slower with file size. Due to this issue it is (as far as I understand) necessary to disable the preview in larger files, using the "(AXIS,hide)" notation in the GCode file.
While this makes it possible to start the file in theory, I found in practice that it also means LinuxCNC does not tell me what the path boundaries are, which for me often is essential to check that I set my zero points correctly so they don't collide with workholding.
What is your process for dealing with large files? I tried to use another CAM (Camotics) to find the boundaries, before loading the file up in LinuxCNC, but frankly it is a hassle because it is yet another step in the process.
Is there an easier way to deal with large gcode files? Does any LinuxCNC user interface NOT suffer from the linear search preview problem?
While this makes it possible to start the file in theory, I found in practice that it also means LinuxCNC does not tell me what the path boundaries are, which for me often is essential to check that I set my zero points correctly so they don't collide with workholding.
What is your process for dealing with large files? I tried to use another CAM (Camotics) to find the boundaries, before loading the file up in LinuxCNC, but frankly it is a hassle because it is yet another step in the process.
Is there an easier way to deal with large gcode files? Does any LinuxCNC user interface NOT suffer from the linear search preview problem?
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19462
- Thank you received: 6529
22 Jun 2023 12:05 #274041
by tommylight
Replied by tommylight on topic How to deal with big files
What size files?
Was this on another topic?
What PC? How much memory?
-
A few years back we had the same issue with RPI3, switching to software rendering did help, from not usable to usable.
I have some older PC's that load 2-6MB files without issues, and i did load a 45MB file on my main PC, but that one is quite powerfull.
Was this on another topic?
What PC? How much memory?
-
A few years back we had the same issue with RPI3, switching to software rendering did help, from not usable to usable.
I have some older PC's that load 2-6MB files without issues, and i did load a 45MB file on my main PC, but that one is quite powerfull.
Please Log in or Create an account to join the conversation.
- knipknap
- Offline
- Premium Member
Less
More
- Posts: 88
- Thank you received: 5
22 Jun 2023 12:37 #274043
by knipknap
Replied by knipknap on topic How to deal with big files
Well, for me, it starts to become laggy at a file size of 1MB, and becomes unusable (dangerous, because e.g. pause buttons no longer work well during a job) at 2-3MB.
The files I *want* to work with are usually in the 10-30MB range, but honestly, I don't think the jobs are super complex and I will sooner or later want to go bigger still. Adaptive paths just become huge, fast. (I am using FreeCAD with LinuxCNC postprocessor - I haven't found it supports arcs.)
The machine has 8GB memory.
I had put some more info in this thread . The previous discussion I found was this one . There was another, but I'm not finding it right now.
But honestly, I think that the question about file size or PC performance is the wrong one - a UI with O(n²) performance (where n is the gcode size) is clearly not a good idea and will become a problem on any machine.
The files I *want* to work with are usually in the 10-30MB range, but honestly, I don't think the jobs are super complex and I will sooner or later want to go bigger still. Adaptive paths just become huge, fast. (I am using FreeCAD with LinuxCNC postprocessor - I haven't found it supports arcs.)
$ cat /proc/cpuinfo | head -5
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 122
model name : Intel(R) Celeron(R) J4125 CPU @ 2.00GHz
The machine has 8GB memory.
I had put some more info in this thread . The previous discussion I found was this one . There was another, but I'm not finding it right now.
But honestly, I think that the question about file size or PC performance is the wrong one - a UI with O(n²) performance (where n is the gcode size) is clearly not a good idea and will become a problem on any machine.
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19462
- Thank you received: 6529
22 Jun 2023 17:50 #274060
by tommylight
Replied by tommylight on topic How to deal with big files
Adding more RAM is the first option, but in your case changing the PC is a much better option, and 8GB should be OK for the size of the files.
A used I7 is a much better option than Celerons and Atom and ARM, they all lack a lot in the cache side of things so for some uses are quite OK but for some other uses are utterly useless.
To test, use a USB stick with LinuxCNC ISO on it, boot the PC from it and open a big file, takes about 5 minutes to know if it is OK for you or not.
A used I7 is a much better option than Celerons and Atom and ARM, they all lack a lot in the cache side of things so for some uses are quite OK but for some other uses are utterly useless.
To test, use a USB stick with LinuxCNC ISO on it, boot the PC from it and open a big file, takes about 5 minutes to know if it is OK for you or not.
Please Log in or Create an account to join the conversation.
- knipknap
- Offline
- Premium Member
Less
More
- Posts: 88
- Thank you received: 5
22 Jun 2023 22:47 #274096
by knipknap
Replied by knipknap on topic How to deal with big files
I think it's not good practice to throw resources at a problem that looks like a bug .
So, after digging into the LinuxCNC code for a few hours, I finally found the culprit. It's here:
github.com/LinuxCNC/linuxcnc/blob/master...s274/glcanon.py#L590
The calls to glCallList() take 25 seconds on a 700K gcode file.
I commented these calls out, and suddenly LinuxCNC is blazingly fast, with the preview still working. Even a 30 MB file takes only 10 seconds to open, after that the file doesn't cause any delays whatsoever.
So, after digging into the LinuxCNC code for a few hours, I finally found the culprit. It's here:
github.com/LinuxCNC/linuxcnc/blob/master...s274/glcanon.py#L590
The calls to glCallList() take 25 seconds on a 700K gcode file.
I commented these calls out, and suddenly LinuxCNC is blazingly fast, with the preview still working. Even a 30 MB file takes only 10 seconds to open, after that the file doesn't cause any delays whatsoever.
The following user(s) said Thank You: tommylight
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19462
- Thank you received: 6529
22 Jun 2023 23:23 #274098
by tommylight
It has been an issue for so long, but not an urgent one as most never bump into it.
Did you do a git ... whatever has to be done, sorry i do not git!
Thank you.
Replied by tommylight on topic How to deal with big files
I absolutely agree.I think it's not good practice to throw resources at a problem that looks like a bug .
It has been an issue for so long, but not an urgent one as most never bump into it.
Did you do a git ... whatever has to be done, sorry i do not git!
Thank you.
Please Log in or Create an account to join the conversation.
- knipknap
- Offline
- Premium Member
Less
More
- Posts: 88
- Thank you received: 5
22 Jun 2023 23:47 #274102
by knipknap
Replied by knipknap on topic How to deal with big files
The following user(s) said Thank You: tommylight
Please Log in or Create an account to join the conversation.
Time to create page: 0.059 seconds