ms-access


Extracting data from 60,000 Facebook ID's in less than 6 hours?


I have downloaded the Faceboojk profile ID's of all of our Facebook fans to an access databse and have written a function to pull the locale data from the Facebook graph api. Here is an example of the graph api:-
http://graph.facebook.com/665117534
My code loops through each record and pulls teh data from the API like this:-
Function fbl(fb_user_id As String) As String
Dim oXMLHTTP As Object, i As Long, vFF As Long, oResp() As Byte
Dim FB_URL As String
Dim fb_user_data As String
Set oXMLHTTP = CreateObject("MSXML2.XMLHTTP")
FB_URL = "http://graph.facebook.com/" & fb_user_id
oXMLHTTP.Open "GET", FB_URL, False
oXMLHTTP.Send
Do While oXMLHTTP.readyState <> 4
DoEvents
Loop
fb_user_data = oXMLHTTP.responsetext
n0 = InStr(1, fb_user_data, "locale") '
If n0 = 0 Then
locale_code = "PAGE"
Else
n00 = InStr(n0, fb_user_data, "}") '
locale_code = Mid(fb_user_data, n0 + 6, n00 - n0)
locale_code = Replace(locale_code, """", "")
locale_code = Replace(locale_code, ",", "")
locale_code = Replace(locale_code, " ", "")
locale_code = Mid(locale_code, 5, Len(locale_code) - 6)
End If
fbl = locale_code
Set oXMLHTTP = Nothing
End Function
This works fine but testing a 100 records took 35 seconds which suggests that the whole table will take 5.6 hours. Is theire a more efficent, speedier way of doing this?
Thanks
Jonathan
My approach has been to use a multi threaded C# application with System.NET.Sockets and turn off the Nagle Algorithm.
I haven't seen many high performance computing applications written in VBA
Edit
Since you're using the XMLHTTP object you should retag this question to reflect that. You may get a better response from people who know that API.

Related Links

Access 2000 Forms - open center screen?
Converting DAO to ADO
Printing an Access report and decimal place weirdness
Extract OLE object containg images using VBscript
ms access query results display problems
Record cannot be read; no read permission on 'MSysObjects'
VBA “delete” button in MS Access 2007
MS Access Typecasting Number to Double
Macro across multiple word documents
MS Access tables match and synchronize
Where can I give permission to read MSysObjects in ACCESS 2007? (not 2003)
How to use Controls collection in Access 2003 and VBA
Events in MS Access 2007
MS-ACCESS: displaying the results of a query in a message box
MS Access 2003 - Opening a report without it printing
Create a field name from a recordset

Categories

HOME
pandas
tizen
raspberry-pi
bpmn
cplex
react-router
mean-stack
read-eval-print-loop
rsyslog
tizen-web-app
electronics
installshield
alpha
append
midi
wheelnav.js
apache-cayenne
circular-dependency
zebra-printers
decimal
progressive-web-apps
textfield
nodatime
predix
wkwebview
dcevm
core-text
dxf
p-value
facebook-access-token
pingfederate
windows-server-2000
subdomains
delicious-api
sql-server-2012-express
preg-match
google-rich-snippets
bosh
usbserial
uiswipegesturerecognizer
force-layout
overriding
libvpx
withings
gzipstream
qcombobox
jsch
logparser
composite-key
capacity
abcpdf9
gridpane
multiple-regression
fputcsv
qcustomplot
revolution-r
msys
cannon.js
mutation-observers
purge
quicklisp
coveralls
kcachegrind
cakephp-3.1
ios9.1
apache-commons-fileupload
processmodel
remobjects
skos
internet-connection
castle
dml
bundles
dbconnection
buster.js
eventual-consistency
chuck
mt
cisco-jtapi
first-responder
netbeans-6.9
spring-portlet-mvc
gnustep
zpt
hamachi
self-extracting
sql-server-profiler
imac
coda-slider
gamma
castle-monorail
compiler-specific
backcolor
data-driven
zend-decorators
post-build

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App