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

Split OutlineBuilder from GlyphBuilder #60

Merged
merged 4 commits into from
Dec 9, 2020
Merged

Split OutlineBuilder from GlyphBuilder #60

merged 4 commits into from
Dec 9, 2020

Conversation

madig
Copy link
Collaborator

@madig madig commented Nov 22, 2020

This complicates the process slightly because now there's a hand-off between both builders, but is conceptually nicer. I think.

@madig madig marked this pull request as ready for review November 23, 2020 20:45
Copy link
Member

@cmyr cmyr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems okay on a fairly quick pass. One concern I've just noticed now is that we're passing around the hashes of the identifiers, instead of passing the identifiers themselves; is there a specific rationale for this? It seems like it could possibly cause problems.

@madig
Copy link
Collaborator Author

madig commented Nov 23, 2020

Inserting them into a set consumes them :D I figured we don't want that? And also avoid cloning.

@cmyr
Copy link
Member

cmyr commented Nov 23, 2020

Okay, I think if we're worried about cloning the answer is to make sure we're using something like Arc<str> that is cheaper to clone. Hash equality is not item equality, and hash collisions are definitely not impossible.

@madig
Copy link
Collaborator Author

madig commented Nov 29, 2020

It does strike me as somewhat intrusive to make all identifiers Arc just so we can hand off easier from OutlineBuilder to GlyphBuilder. However, with the recent UFO spec addition of public.objectLibs, identifiers will get a more prominent role in enabling setting libs on various objects identifiable with an Identifier :o

@cmyr
Copy link
Member

cmyr commented Dec 4, 2020

Yea sorry! I didn't mean that we should use Arc<Identifier>, but rather Identifier should be declared as Identifier<Arc>, instead of as Identifier`.

@madig madig force-pushed the outline-builder branch 2 times, most recently from f769aff to 6a8b05b Compare December 7, 2020 22:51
@github-actions
Copy link

github-actions bot commented Dec 7, 2020

🗜 Bloat check ⚖️

Comparing 2b11b7a against 1c77b74

target old size new size difference
target/release/examples/open_ufo 1.49 MB 1.51 MB 20.48 KB (1.34%)
target/debug/examples/open_ufo 6.74 MB 6.8 MB 61.77 KB (0.89%)

@linebender linebender deleted a comment from github-actions bot Dec 7, 2020
@linebender linebender deleted a comment from github-actions bot Dec 7, 2020
Copy link
Member

@cmyr cmyr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, only real thing of note is that I think we can save ourselves needing to do all of these from_strs, as mentioned in the more detailed comments.

Thanks again for pushing on with this!

src/shared_types.rs Outdated Show resolved Hide resolved
src/shared_types.rs Outdated Show resolved Hide resolved
src/glyph/builder.rs Show resolved Hide resolved
src/glyph/builder.rs Show resolved Hide resolved
@github-actions
Copy link

github-actions bot commented Dec 9, 2020

🗜 Bloat check ⚖️

Comparing 801cc06 against 1c77b74

target old size new size difference
target/release/examples/open_ufo 1.49 MB 1.51 MB 19.11 KB (1.25%)
target/debug/examples/open_ufo 6.74 MB 6.8 MB 54.48 KB (0.79%)

@github-actions
Copy link

github-actions bot commented Dec 9, 2020

🗜 Bloat check ⚖️

Comparing fd82edc against 1c77b74

target old size new size difference
target/release/examples/open_ufo 1.49 MB 1.51 MB 19.11 KB (1.25%)
target/debug/examples/open_ufo 6.74 MB 6.8 MB 54.48 KB (0.79%)

@madig madig merged commit d393766 into master Dec 9, 2020
@madig madig deleted the outline-builder branch December 9, 2020 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants