Closed
Bug 832936
Opened 12 years ago
Closed 11 years ago
[Contacts] mozContacts API should provide a method to easily retrieve how many contacts we have without requesting the contacts list
Categories
(Core :: DOM: Device Interfaces, defect)
Core
DOM: Device Interfaces
Tracking
()
People
(Reporter: alberto.pastor, Assigned: reuben)
References
Details
(Whiteboard: [fixed-in-birch])
Attachments
(3 files, 1 obsolete file)
(deleted),
patch
|
sicking
:
review+
sicking
:
superreview+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
gwagner
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
gwagner
:
review+
|
Details | Diff | Splinter Review |
In some cases would be useful just retrieve the number of contacts, without retrieving the whole list. If that request is fast enough, I can think on several applications of that method.
No idea if that would be easily included in an standardization process.
Reporter | ||
Comment 1•12 years ago
|
||
CC'ing Gregor and Jonas.
Thoughts?
Comment 2•12 years ago
|
||
(In reply to Alberto Pastor from comment #0)
> In some cases would be useful just retrieve the number of contacts, without
> retrieving the whole list. If that request is fast enough, I can think on
> several applications of that method.
>
> No idea if that would be easily included in an standardization process.
We (bent, sicking reuben and me) had a long discussion about the contacts API performance on Friday.
I am not 100% convinced that our idea we came up with will actually work but we definitely want to improve the current situation and add cursors and a count function.
Reporter | ||
Comment 3•12 years ago
|
||
Pointer to Github pull-request
Reporter | ||
Updated•12 years ago
|
Attachment #705807 -
Attachment is obsolete: true
Reporter | ||
Comment 4•12 years ago
|
||
Knowing if there are no contacts in the DB would help to include some features.
blocking-b2g: --- → leo?
Updated•12 years ago
|
Assignee: nobody → reuben.bmo
Comment 5•12 years ago
|
||
(In reply to Alberto Pastor [:albertopq] from comment #4)
> Knowing if there are no contacts in the DB would help to include some
> features.
What features? Required features? Please list bugs impacted with a renom.
blocking-b2g: leo? → -
Updated•12 years ago
|
Blocks: b2g-contact
Comment 6•12 years ago
|
||
It is not clear to me which use cases would work better with knowing how many contacts are currently in the DB. Comment 4 is about knowing if there are no contacts in the DB which isn't the same as knowing how many they are...
Assignee | ||
Comment 7•12 years ago
|
||
Alberto, can you clarify the use cases you have in mind here? See comment 6.
Flags: needinfo?(alberto.pastor)
Reporter | ||
Comment 8•12 years ago
|
||
- As Mounir said, checking if you have no contacts for not showing the button "Add to existing contact", for example. I think it makes more sense
- Any app that want to display the number of contacts without requesting them.
- Pre calculate list containers height for making rendering faster
I don't think is a must, but a nice to have at some point. That's the reason I created a bug for tracking it.
Flags: needinfo?(alberto.pastor)
Reporter | ||
Comment 9•12 years ago
|
||
Ups, the first point was truncated:
- As Mounir said, checking if you have no contacts for not showing the button "Add to existing contact", for example. I think it makes more sense having a "getCount" that an API for knowing if you have no contacts, but is only an opinion from a developer perspective.
I agree that getting the count sounds more useful, and no more complicated to implement or use, than exposing simply "are there contacts or not".
Assignee | ||
Comment 11•12 years ago
|
||
Attachment #751233 -
Flags: superreview?(jonas)
Attachment #751233 -
Flags: review?(jonas)
Assignee | ||
Comment 12•12 years ago
|
||
Attachment #751234 -
Flags: review?(anygregor)
Assignee | ||
Comment 13•12 years ago
|
||
Attachment #751235 -
Flags: review?(anygregor)
Updated•11 years ago
|
Attachment #751234 -
Flags: review?(anygregor) → review+
Updated•11 years ago
|
Attachment #751235 -
Flags: review?(anygregor) → review+
Attachment #751233 -
Flags: superreview?(jonas)
Attachment #751233 -
Flags: superreview+
Attachment #751233 -
Flags: review?(jonas)
Attachment #751233 -
Flags: review+
Assignee | ||
Comment 14•11 years ago
|
||
Component: General → DOM: Device Interfaces
OS: Mac OS X → All
Product: Boot2Gecko → Core
Hardware: x86 → All
Whiteboard: [fixed-in-birch]
Version: unspecified → Trunk
Comment 15•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
You need to log in
before you can comment on or make changes to this bug.
Description
•