2

I am using ContactsApp in Google Drive Add-On to fetch contacts when user types in input box . If I have many contacts ContactsApp.getContactsByName responds very slowly . I have around 5000 contacts and this method takes around 40 seconds to respond. I logged the times to test. One of my clients has around 20,000 contacts and he cannot see results of search. How can we improve performance of ContactsApp.getContactsByName ? We cannot fetch or cache 20,000 contacts.

I saw a similar question which is unanswered ContactsApp Performance

jkb016
  • 439
  • 1
  • 7
  • 17

1 Answers1

2

This seems to be a known issue. Check this page for more information. Unfortunately, as you can see, I don't see an official fix available for this yet.

Until then, the only workaround I can think of would be a little bit in parallel to some of the advice given here. Divide your contacts into groups of smaller number and query those accordingly. Using and creating several ContactGroups in this case might give you a better turn-around time.

pointNclick
  • 1,584
  • 1
  • 12
  • 17