Hash print future print time guestimates will be accurate from the print start

Wanted to say thank you for all of the work done with octoprint but had a suggestion (a thought). If you hash a gcode print, it will help to have that stored, as future print times could be referenced when printing the same items. For example, before printing, hash printjob1.gcode - When completed, store the print time and hash. When printing again, reference your hash table to see if the job has been printed again and use that for reference. This addition would be great, as for this, any hashing algorithm (md5 maybe) would be fine, as it would allow for very accurate guesstimates, even when starting a print. Secondly, you could add a function that ensures that maybe only the top 200 hashes are stored, and after such has been completed, either new ones could be saved, and old roll off the back, or perform a cleanup so this table never gets too big. Maybe you could store a lot more before worrying about a cleanup, but the over all idea is the take-a-way. Thoughts?

Hello @MrJay! (?)

For your question relates to OctoPrint and not to this website, I took the liberty to move it to the forum General

1 Like

So I have had a read of your suggestions, and I think I understand what you mean. It did leave me with a question, which was why the hashing of the file would be important, and why it couldn't just be a relational table of filename to print time.

I think also, your print time accuracy issue can be solved with the plugin Print Time Genius. It collects some data over time, then runs print file against this engine to compute quite accurate times.

For storing details of saved prints, there is also Print Job History

1 Like

Thank you for that feedback and I will give them a look. To answer your question about hashing, it would be an easy way to know if the file is unique (meaning, you didn't edit it since a prior run). Many times I fix a file and over write the file -- Because the file could be larger etc etc, it surely would be quite different then the original file. But to talk on your topic, you could save the file name you are computing as the file hash (internally), and then you could have it already tied to the file and referenced for the future. Hope that explains -- For this I would just hash with the fastest algorithm, as your not worried about hash collisions for 3dprinting (ha).