Closed Bug 747315 Opened 12 years ago Closed 6 years ago

Port FeedSniffer to JS

Categories

(Firefox Graveyard :: RSS Discovery and Preview, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INACTIVE

People

(Reporter: asaf, Unassigned)

References

Details

Attachments

(1 file)

The feed-sniffer is a very lean component, which only uses scriptable xpcom stuff. It could therefore be ported to JS easily.
When I raised this issue in the other bug, I didn't consider a couple of things:
1) This code is called for *every* request
2) c++ implementations benefit from using nsDependentString on the 

Each of these issues on its own is not a problem, but together they could hurt performance: we'll copy-and-transform a potentially large bytes array for every request. For the simple case, in which the data is not encoded, we could cut the bytes array earlier, but for the gzip case I don't think there's much we can do.

So, I'm not sure if this is a deal-breaker or not, but it sure might be. Gavin, my request for feedback is mostly for this issue.  Otherwise there's some cleanup I need to do (and probably fix some typos in the encoding-case, which I have not tested yet) ahead of a full review.

On a side note, the |String.fromCharCode...join| solution is not my final proposal here either way. Given that this code is perf-sensitive, using the unicode-converter is probably the way to go *iff* we decide to make this trade-off.
Attachment #617220 - Flags: feedback?(gavin.sharp)
Comment on attachment 617220 [details] [diff] [review]
works, but not landable as-is

I also failed to realize how often this was being called; I think having this code run in a hot pageload path probably precludes using xpconnect/JS. Might be interesting to push it to try to try to see what impact it would have on our Tp tests (if any!).
Attachment #617220 - Flags: feedback?(gavin.sharp) → feedback-
Per policy at https://wiki.mozilla.org/Bug_Triage/Projects/Bug_Handling/Bug_Husbandry#Inactive_Bugs. If this bug is not an enhancement request or a bug not present in a supported release of Firefox, then it may be reopened.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INACTIVE
Product: Firefox → Firefox Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: