title: How to reduce query time for stackexchange api?
body: <p>I try to collect for a list of users the questions.</p>
  
  <p>So I prepared this command lines:</p>
  
  <pre><code>library(stackr)
  dft &lt;- data.frame()
  for (j in 1:nrow(df)) {
       questions &lt;- stack_users(df$userid[j], "questions", num_pages=1000000, pagesize=100, filter="withbody")                
      for (s in 1:nrow(questions)){
        dft &lt;- rbind(dft, data.frame(
          tags               = ifelse(is.null(questions$tags[s])               , NA, questions$tags[s]),
          is_answered        = ifelse(is.null(questions$is_answered[s])        , NA, questions$is_answered[s]),
          view_count         = ifelse(is.null(questions$view_count[s])         , NA, questions$view_count[s]),
          accepted_answer_id = ifelse(is.null(questions$accepted_answer_id[s]) , NA, questions$accepted_answer_id[s]),
          answer_count       = ifelse(is.null(questions$answer_count[s])       , NA, questions$answer_count[s]),
          score              = ifelse(is.null(questions$score[s])              , NA, questions$score[s]),
          last_activity_date = ifelse(is.null(questions$last_activity_date[s]) , NA, questions$last_activity_date[s]),
          creation_date      = ifelse(is.null(questions$creation_date[s])      , NA, questions$creation_date[s]),
          last_edit_date     = ifelse(is.null(questions$last_edit_date[s])     , NA, questions$last_edit_date[s]),
          question_id        = ifelse(is.null(questions$question_id[s])        , NA, questions$question_id[s]),
          link               = ifelse(is.null(questions$link[s])               , NA, questions$link[s]),
          title              = ifelse(is.null(questions$title[s])              , NA, questions$title[s]),
          body               = ifelse(is.null(questions$body[s])               , NA, questions$body[s]),
          owner_reputation   = ifelse(is.null(questions$owner_reputation[s])   , NA, questions$owner_reputation[s]),
          owner_user_id      = ifelse(is.null(questions$owner_user_id[s])      , NA, questions$owner_user_id[s]),
          owner_user_type    = ifelse(is.null(questions$owner_user_type[s])    , NA, questions$owner_user_type[s]),
          owner_accept_rate  = ifelse(is.null(questions$owner_accept_rate[s])  , NA, questions$owner_accept_rate[s]),
          owner_link         = ifelse(is.null(questions$owner_link[s])         , NA, questions$owner_link[s])
        ))
  
      }       
  
  }
  </code></pre>
  
  <p>However it takes to much time to collect a list of different user ids. Is there any way to reduce the execution time or update to code I could make?</p>