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 7668189
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T15:17:52+00:00 2026-05-31T15:17:52+00:00

I wrote a script to use active_record without rails. My tests are on windows

  • 0

I wrote a script to use active_record without rails. My tests are on windows 7 (Trendmicro Virus protection enabled – can’t disable it because the notebook is property of my company), Lenovo T520. I wrote a little tk script that started in about a second. I added the ‘sqlite3’ gem and it started in 2 seconds.

After requiring the ‘active_record’ gem startup time when up to 30 seconds!!

Can I do something against that (please don’t recommend changing the os)? Is ruby just for use with rails so that it can run on a unix box where the performance is ok?

Versions are:
ruby 1.9.3p125 (2012-02-16) [i386-mingw32]
activerecord (3.2.2)

Edit: Something interesting happened. After starting the script a few times “requiring ‘active_record'” is done in 0.53 seconds. Maybe it’s os-caching or virus protection ignores the files because it considers them safe. After a fresh reboot the time went up to 3.5 seconds on the first run and dropped again on the second run to the known 0.53 seconds.

  • 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-05-31T15:17:53+00:00Added an answer on May 31, 2026 at 3:17 pm

    I have an somehow acceptable solution. It depends on the order the modules are required:

    Startup 30 seconds:
    require ‘tk’
    require ‘active_record’

    Startup 2 seconds:
    require ‘active_record’
    require ‘tk’

    IMHO this thing is answered (but I’m not really satisfied).

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

Sidebar

Related Questions

I have a Perl script I wrote for my own personal use that fetches
I wrote a PHP script. When i try to use it throws an error.
Using Python 2.6, I wrote a script in Windows XP. The script does the
I wrote an small script to use split() as this, use strict; use warnings;
I wrote this script awhile back and have modified it to use css sprites
I realized that the script I wrote is attempting to use both javascript and
I wrote the following script so that an end-user can create a word document
How can use Python2.5 with to write scripts in vim? I'm using vim 7.2
I have to use windows to write some shell scripts. I decided to use
I wrote a script to export twitter friends as foaf rdf description. Now I'm

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.