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

Implement atoms for parsing HTML, comparing Attrs, etc #85

Closed
burg opened this issue Sep 22, 2012 · 4 comments
Closed

Implement atoms for parsing HTML, comparing Attrs, etc #85

burg opened this issue Sep 22, 2012 · 4 comments

Comments

@burg
Copy link

@burg burg commented Sep 22, 2012

In places like the HTML parser (hubbub_html_parser.rs), many redundant ~strs are created simply for the purpose of matching tag names and attributes. This should instead be done with atoms.

To implement atoms, we may need to port something like gperf (http://www.gnu.org/software/gperf/) to Rust, or have some other solution for fast string lookup.

@ILyoan
Copy link
Contributor

@ILyoan ILyoan commented May 3, 2013

How about using trie like data structure?

@SimonSapin
Copy link
Member

@SimonSapin SimonSapin commented Aug 5, 2013

Is this the same as #282?

@tetsuharuohzeki
Copy link
Member

@tetsuharuohzeki tetsuharuohzeki commented Oct 16, 2013

From irc logs:

2 minutes ago tetsuharu:What is this "atom" meaning?: #85
2 minutes ago SimonSapin:tetsuharu: interned string

@kmcallister
Copy link
Contributor

@kmcallister kmcallister commented Apr 28, 2014

Folding this into #1153.

port something like gperf (http://www.gnu.org/software/gperf/) to Rust

I'm using rust-phf for various static string tables in the new HTML5 parser.

glennw added a commit to glennw/servo that referenced this issue Jan 16, 2017
Fix rotation of uv coordinates for box shadow pieces.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.