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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T01:11:12+00:00 2026-05-28T01:11:12+00:00

We are considering a move to jruby, and as part of this have been

  • 0

We are considering a move to jruby, and as part of this have been researching testing approaches and frameworks. I’ve been testing rspec on my local development machine and am finding that the total time taken to run 2 tests for a single class with 2 very simple methods is 7-8 seconds. By simple, I mean one setter and one that returns true.

The rspec output shows that the tests run in roughly 2 seconds, so 5-6 seconds of the total time is spent loading and initializing rspec. I’m running from the command line using

C:\rubycode\rspec_tutorial>rspec --profile user_spec.rb
..

Top 2 slowest examples:
  User User should NOT be in any roles not assigned to it
    0.023 seconds ./user_spec.rb:15
  User User should be in any roles assigned to it
    0.006 seconds ./user_spec.rb:10

Finished in 2 seconds
2 examples, 0 failures

I’m running jruby 1.6.5 and rspec 2.7.1

I’ve read this post, Faster RSpec with JRuby
but it’s over 1.5 years old, and the answer relates to running suites of tests as opposed to short bursts of a small number of tests locally to aid TDD, which is how we want to develop. Down the line we’ll incorporate a CI server.

My question is, is this the expected execution time? Is there any way to speed up the running of rspec tests on the local development machine uner JRUBY?

EDIT:

Biggest performance gains were switching from 64 bit “server” JVM to 32 bit “client” mode. I saw about a 40% reduction in the time taken to run a simple test. I got Nailgun up and running as well, but performance varied. The link provided below by banzaiman was most helpful

  • 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-28T01:11:13+00:00Added an answer on May 28, 2026 at 1:11 am

    It is not loading RSpec, but it is JVM startup time you are feeling.

    See https://github.com/jruby/jruby/wiki/Improving-startup-time for more information.

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

Sidebar

Related Questions

I have been considering a range of options to move away form using scriptlets
Considering this part of a Java class, private List<Object> components = new ArrayList<Object>(); private
I'm working on an android game and have been considering my main game loop.
I have recently joined a small development team that is considering a new version
We are considering a move from SVN to Mercurial, and have encountered a stumbling
Like many others on this site I am considering a move to ASP.NET MVC
I am considering to move frome Microsoft languages to PHP (just for web dev)
I was considering what would it take (technologically) to move all the web traffic
Considering that I have a Schema named SBST I want to find all empty
Considering it's a common issue, what could be the source of this error if

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.