Closed Bug 1379354 Opened 2 years ago Closed 2 years ago

Improve the UnicodeToEntity hashtable hash routine

Categories

(Core :: HTML: Parser, enhancement)

enhancement
Not set

Tracking

()

RESOLVED FIXED
mozilla56
Tracking Status
firefox56 --- fixed

People

(Reporter: ehsan, Assigned: ehsan)

Details

Attachments

(1 file)

No description provided.
Bug 1379282 is the motivation behind fixing this.
This hash table is only used by Save As...: Web page (complete), which could do without this, and potentially by XPCOM extensions. I think we should remove the entire hash table in 57 if not already in 56.
If I follow the usage of the table through the callers, I eventually get to nsDocumentEncoder::EncodeToString and that has many consumers so it seems to me that it's not just "Save As...". As for replacing the hash table, do we already have another mechanism to lookup the entity from unicode?
Comment on attachment 8884501 [details] [diff] [review]
Improve the UnicodeToEntity hashtable hash routine

Review of attachment 8884501 [details] [diff] [review]:
-----------------------------------------------------------------

If this is actually a performance issue, we can probably do even better since the data in the table is static.
Attachment #8884501 - Flags: review?(wchen) → review+
I don't have any evidence that it is a performance issue.  I found this while auditing the code for the hash table hash functions in our code base.  In general I file these bugs so that people can wontfix them if they think they aren't worth fixing.
I guess I will land the patch since it doesn't hurt anything?
Pushed by eakhgari@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/20c8a416aefb
Improve the UnicodeToEntity hashtable hash routine; r=wchen
https://hg.mozilla.org/mozilla-central/rev/20c8a416aefb
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
Assignee: nobody → ehsan
You need to log in before you can comment on or make changes to this bug.