Skip to content
This repository was archived by the owner on Aug 22, 2019. It is now read-only.

Conversation

jwilkins
Copy link

@jwilkins jwilkins commented Sep 4, 2011

Base.new.methods.count
=> 10692

@garybernhardt
Copy link
Owner

I was excited to see this! But, after checking it out, I saw that it makes Base.new take 35 seconds on my machine and emit a bunch of warnings along the way:

failbowl:base(950m|jwilkins/master) $ time ruby -e 'require "lib/base"; puts Base.new.methods.count' /Users/grb/.rvm/gems/ree-1.8.7-2011.03@das/gems/base-0.0.1/lib/base.rb:2: warning: already initialized constant VERSION Notice: for 10x faster LSI support, please install http://rb-gsl.rubyforge.org/ Neither Pony nor ActionMailer appear to be loaded so email-spec is requiring ActionMailer. /Users/grb/.rvm/gems/ree-1.8.7-2011.03@das/gems/webby-0.9.4/lib/webby/helpers/tag_helper.rb:7: warning: already initialized constant HTML_ESCAPE 10028 ruby -e 'require "lib/base"; puts Base.new.methods.count' 24.57s user 9.98s system 98% cpu 34.909 total

Though it's just a joke project, I do want base to be fast enough to be easily imported and played with. :) Any ideas?

@garybernhardt
Copy link
Owner

The blacklisting thing worries me as well. If some gems had to be blacklisted, there are probably a thousand more that would break but didn't happen to be installed when @jwilkins wrote the patch...

@benmanns
Copy link

benmanns commented Sep 5, 2011

Perhaps we should automatically install all gems as dependencies of Base.

@garybernhardt
Copy link
Owner

Gem::Specification.new do |spec|
  spec.add_dependency("*")
end

@jwilkins
Copy link
Author

jwilkins commented Sep 6, 2011

I added the blacklist because eventmachine caused a segfault. @dkubb, dm-do-adapter loaded eventmachine, so that's why it was added, I think I got overzealous with dm-sqlite-adapter.

However, I started to dig into the problem and realized that eventmachine had just gotten screwed up on my system. Not quite certain how, but after a fresh install of eventmachine, it all seems fine. I'll push a new version in a moment.

@dkubb
Copy link
Contributor

dkubb commented Sep 6, 2011

@jwilkins weird that dm-do-adapter would load eventmachine. There's no dependency on it, and it's not referenced anywhere in the Gemfile, gemspec or lib afaik.

@garybernhardt
Copy link
Owner

I'm still skeptical—a 30 second startup time is punishing. :(

@dkubb
Copy link
Contributor

dkubb commented Sep 9, 2011

Can it be paralellized? ;)

@jwilkins
Copy link
Author

How fast do you want it to be? I could: threadify it, only add from a whitelist of common gems that don't add too much to startup, only add X gems (randomly, first X). Something else?

@garybernhardt
Copy link
Owner

I kind of like the idea of requiring everything; it's like a satirical version of Bundler. Maybe as a separate gem so it's not constrained? The name "everything" isn't currently taken... ;)

@mourner
Copy link

mourner commented Jan 8, 2013

Though it's just a joke project

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants