Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7716977
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T02:46:03+00:00 2026-06-01T02:46:03+00:00

The main problem I’m having is pulling data from tables, but any other general

  • 0

The main problem I’m having is pulling data from tables, but any other general tips would be welcome too. The tables I’m dealing with have roughly 25 columns and varying numbers of rows (anywhere from 5-50).

Currently I am grabbing the table and converting it to an array:

require "watir-webdriver"
b = Watir::Browser.new :chrome
b.goto "http://someurl"

# The following operation takes way too long
table = b.table(:index, 1).to_a

# The rest is fast enough
table.each do |row|
    # Code for pulling data from about 15 of the columns goes here
    # ...
end
b.close

The operation table = b.table(:index, 5).to_a takes over a minute when the table has 20 rows. It seems like it should be very fast to put the cells of a 20 X 25 table into an array. I need to do this for over 80 tables, so it ends up taking 1-2 hours to run. Why is it taking so long and how can I improve the speed?

I have tried iterating over the table rows without first converting to an array as well, but there was no improvement in performance:

b.table(:index, 1).rows.each do |row|
    # ...

Same results using Windows 7 and Ubuntu. I’ve also tried Firefox instead of Chrome without a noticeable difference.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T02:46:04+00:00Added an answer on June 1, 2026 at 2:46 am

    A quick workaround would be to use Nokogiri if you’re just reading data from a big page:

    require 'nokogiri'
    doc = Nokogiri::HTML.parse(b.table(:index, 1).html))
    

    I’d love to see more detail though. If you can provide a code + HTML example that demonstrates the issue, please file it in the issue tracker.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having some issues with parsing CSV data with quotes. My main problem is
I am having a problem with PHP from that adds data to MYSQL database
Problem description : - Step 1: Take input FILE_NAME from user at main thread.
Here is a small program showing a problem: import Data.Fixed main = do print
My main problem is storing the data which is not supported by Core Data.
I am using jquery notifications, but the main problem is that it adds the
.net MVC 2.0 question: The main problem is I want to paging my data
I'm trying to learn the MVVM pattern. The main problem I'm having is learning
The main problem I'm having is trying to get the total wins loses and
The main problem is, how would you ensure people can login to the xmpp

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.