Charles Oliver Nutter wrote:
Charles Oliver Nutter wrote:
In order to get rescue working correctly, and to fix a growing
problem with exception backtraces repeating the same entry for
multiple levels, I've had to saddle the compiler with a perf penalty:
for each new line of code, it's constructing a SimpleSourcePosition
object to track the current line. This will be temporary until I can
find a way to repurpose the Java stack trace for Ruby backtraces
(since all necessary info is there). In the short term, however, it's
worth it to get the compiler completely functional.
r4367: I have eliminated this cost now, or at least eliminated it from
execution. Instead of constructing a SimpleSourcePosition every time
the script needs to update ThreadContext with the correct position, it
now loads from a static field initialized once at class load. This has
put perf numbers back where they were before the change. Static memory
usage would be a bit higher now, with one SimpleSourcePosition for
every distinct, code-containing file/line combination, but those are
the breaks. If we come up with a better way to represent the current
position in ThreadContext, we may be able to eliminate this.
Not sure, but this seems to break. My testJDBCperformance.rb-script that
I run on Tuesday evening now fails. A simple reproduction (having Rails
and AR-JDBC installed since earlier)
require 'rubygems'
require 'active_record'
require 'active_record/connection_adapters/jdbc_adapter'
fails with:
/Users/olabini/workspace/jruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require': no such file to load --
active_record/connection_adapters/jdbc_adapter (MissingSourceFile)
from
/opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in
`require'
from test_failure.rb:3:in `new_constants_in'
from
/opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in
`require'
from test_failure.rb:3:in `require'
Cheers
--
Ola Bini (http://ola-bini.blogspot.com)
JRuby Core Developer
Developer, ThoughtWorks Studios (http://studios.thoughtworks.com)
"Yields falsehood when quined" yields falsehood when quined.
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email