Closed Bug 926752 Opened 11 years ago Closed 6 years ago

do not validate or sanitize contacts on output

Categories

(Core Graveyard :: DOM: Contacts, defect, P5)

ARM
Gonk (Firefox OS)
defect

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: bkelly, Unassigned)

References

Details

(Keywords: perf, Whiteboard: [c= p= s= u=])

Attachments

(1 obsolete file)

While profiling contacts load for bug 918179 I noticed that about 10% of the time in the client process is spent validating and sanitizing contact data. Since data is cleaned on the input, it seems unnecessary to do this every time when loading the data. I prototyped a proof-of-concept and ran it through my contacts API benchmark app here: https://github.com/wanderview/gaia/tree/contacts-api-bench/test_apps/contacts-bench Baseline performance with current m-c: Rev: 150676:3a486112072b Results: 3900ms, 3913ms, 3915ms Content: 1000 contacts (reference-workload-heavy) With the proof-of-concept patch added I got: Results: 3121ms, 3007ms, 2982ms, 2995ms This is an improvement of about 900ms or a bit more than 20%. This seems significant enough to pursue further. I'll post my proof-of-concept in the next comment.
Attached patch contacts-fast-output (obsolete) (deleted) — Splinter Review
Here is the proof-of-concept. Definitely needs some refactoring.
Attachment #816932 - Flags: feedback?(anygregor)
Comment on attachment 816932 [details] [diff] [review] contacts-fast-output Gregor pointed out on irc Reuben should probably look at this first since it will likely conflict with his work in bug 850430.
Attachment #816932 - Flags: feedback?(anygregor) → feedback?(reuben.bmo)
In regards to blocking bug 914913, I looked at the profile a bit closer and I think this will only save us about 20ms in time to above-the-fold. Most of the benefit is throughout the remainder of the load. Based on that I'm dropping the block for bug 914913 and I'm going to nom for 1.3.
No longer blocks: 914913
blocking-b2g: --- → 1.3?
And since I don't think this is going to be koi+, I won't be working on it for a bit.
Assignee: bkelly → nobody
Status: ASSIGNED → NEW
Comment on attachment 816932 [details] [diff] [review] contacts-fast-output Review of attachment 816932 [details] [diff] [review]: ----------------------------------------------------------------- As mentioned on IRC, this is fine, but will be obsoleted by WebIDL.
Attachment #816932 - Flags: feedback?(reuben.bmo)
Component: DOM: Device Interfaces → DOM: Contacts
Comment on attachment 816932 [details] [diff] [review] contacts-fast-output This patch no longer makes sense given we are going through webidl after bug 850430. This is unfortunate since with webidl we are slower than 4 seconds while with this patch we were faster than 3 seconds.
Attachment #816932 - Attachment is obsolete: true
blocking-b2g: 1.3? → ---
Priority: -- → P3
Bulk priority change, per :mdaly
Priority: P3 → P5
DOM: Contacts isn't used anymore. Closing all remaining bugs.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: