Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unneeded API calls #33

Open
adrianov opened this issue Apr 24, 2014 · 0 comments
Open

Unneeded API calls #33

adrianov opened this issue Apr 24, 2014 · 0 comments

Comments

@adrianov
Copy link

I faced a problem that VK authentication was too slow on my production server. Started digging. And found, besides that there was configured slow DNS-server (solved with namebench and dnsmasq), that your gem makes 3 extra calls to VK API, querying user's data. However, these data are only necessary for creating user records for the first time. Could you make these data be queryied only by explicit calls of auth hash properties?

Results of rack-mini-profiler gem:

GET http://127.0.0.1:3000/users/auth/vkontakt...     27.9   +0.0    
  Net::HTTP POST /access_token   60.8   +15.0   
   Net::HTTP POST /access_token  25.6   +76.0   
  Net::HTTP GET /method/users.get?access_token=...   57.0   +103.0  
   Net::HTTP GET /method/users.get?access_token=...  30.5   +160.0  
  Net::HTTP GET /method/database.getCountriesBy...   65.1   +192.0  
   Net::HTTP GET /method/database.getCountriesBy...  23.4   +257.0  
  Net::HTTP GET /method/database.getCitiesById?...   63.9   +282.0  
   Net::HTTP GET /method/database.getCitiesById?...  33.6   +346.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant