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

MS Access = referencing a control that is within a sub form
Get Name of Current VBA Function
MS Access 2010: How do forms communicate values to each other?
MSAccess - populate text box with value from query
How do I revert to default System.mdw after doing a SetDefaultWorkgroupFile?
ms-access 2007 runtime and lockWindowUpdate
Show Report Pages Count Only On Print
Custom Record Navigation
How to lock specific rows in a subform when a form loads?
If [ComboBox] Is Null Statement in VBA/Access 2007
Check Microsoft Access Form Values before Save
Is there any way to destroy MDW reference
vba check if specific process task id is still running
Access exports only 1st column of query
make a table in MS Access
how to get this code into a access form as text label?

Categories

HOME
gitlab
asp.net-core
single-sign-on
view
iot
bpmn
cvs
yarn
jsrender
twitter-bootstrap-4
v8
callback
wheelnav.js
export-to-csv
google-cloud-spanner
alignment
n-gram
decimal
iolanguage
foselasticabundle
http-status-code-504
interop
firefox-webextensions
introduction
grails3
riot.js
opencover
cloudhub
graphicsmagick
sox
lcd
hammerspoon
blazemeter
srcset
nat
tinymce-4
uisplitview
karaf
protovis
git-merge
grid.mvc
wso2carbon
youcompleteme
pango
dandelion
blogengine.net
alphabet
akka-cluster
dwscript
yt-project
google-feed-api
mathematica-frontend
merge-conflict-resolution
mongocsharpdriver
autorest
clang-static-analyzer
react-native-listview
qcustomplot
rvest
revolution-r
itextpdf
jms2
t4mvc
qdialog
responsive-images
myo
sailfish-os
sniffer
mmc
python-green
offloading
qcodo
gulp-less
contenttype
seaside
batterylevel
cassini-dev
robotics-studio
selected
dmoz
bluepill
regsvr32
dotnethighcharts
ohm
netdna-api
self-extracting
visitor-statistic
sudzc
rescale
libs
microsoft-virtualization
data-driven
w3wp

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