Increase max_length for the material_name field#138
Merged
Conversation
CZDanol
previously approved these changes
May 13, 2026
The openprinttag-database currently contains 1655 materials with name longer than actual limit of 31 bytes. This statistics looks much better with the limit of - 47 bytes: 193 material_name does not fit - 63 bytes: 16 material_name does not fit
5e006da to
c7ea83c
Compare
Contributor
Author
|
I am changing the limit to 63. I was a bit too cautious and 64 byte buffer should be still fine. |
ondratu
approved these changes
May 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The openprinttag-database currently contains 1655 materials with name longer than actual limit of 31 bytes.
We want to keep the limit somehow round-number to allow for static buffer allocation.
That is why I am suggesting 47 bytes (48 with null termination). This statistics looks much better with for the limit of 47 bytes: Just 193 materials and most of them could be easily shortened to fit if needed.
I have also considered 63 bytes, which leaves only 16 materials with too long name. But this might be already impractical when the field is send with additional bytes.
I am attaching full histogram of
material_namelengths from the database:Here are few examples of materials, which would not fit even when this gets approved (
Panchroma™ Dual Matte PLA Chameleon (Teal-Yellow)PLA Temperature Color Change Black To Red To YellowPearlescent Translucent Neon Green PETG PRO v2 - UV ReactiveABS Color Change Green to Yellow (Heat Activated)Sculpt-High Temperature Resistant Resin Ultra WhiteFilaflex 95 Foamy Footwearology edition LavenderPink Grapefruit: High Temperature Virgin PET-G with SparklesMagic Silk PLA Tarnished Copper (Gunmetal Gray / Copper)Rapid PLA Gradient Thistle Purple & Ethereal Blue