<rtyler>
^ in which a big problem with Rails is blamed on Ruby aka MRI being slow
<rtyler>
except that the author apparently doesn't recognize that CPU benchmarks don't mean diddly with Rails
djbkd has joined #jruby
<rtyler>
(not that I disagree with the stagnation points of rails)
shellac has quit [Quit: Computer has gone to sleep.]
<mberg>
Some pretty shoddy writing there.
<mberg>
"he ruby interpreter is just a volunteer effort. Between 2007-2012, there were a number of efforts to fix the interpreter and make it fast (Rubinius, JRuby, YARV, etc) But lacking backers with staying power, the volunteers got bored and some of the efforts withered."
<rtyler>
yep
<mberg>
Even though he goes on to say JRuby is still active, listing it with efforts "between 2007-2012" in the first place is disingenous.
<rtyler>
writing with a tone of authority but without actually seeming to know much
djbkd has quit [Remote host closed the connection]
bbrowning is now known as bbrowning_away
blaxter has quit [Ping timeout: 264 seconds]
<mberg>
And Rubinius DID have a corporate sponsorship back then. :/
<chrisseaton>
Yeah didn't they have four people or something like that? Even today I think there's probably 10 people worldwide paid to work on alternate Ruby implementations.
<mberg>
I wonder how different their bar chart would look like with stock PHP measured, since most sites aren't actually running HVVM.
Locke23rus has joined #jruby
yfeldblum has joined #jruby
<rtyler>
oh wells
djbkd has joined #jruby
skade has quit [Quit: Computer has gone to sleep.]
brauliobo has quit [Quit: Konversation terminated!]
brauliobo has joined #jruby
yfeldblum has quit [Read error: Connection reset by peer]
yfeldblum has joined #jruby
<cremes>
google has failed me… are there any tricks to get jruby to improve CSV import performance?
<cremes>
it’s a real dog compared to mri
<cremes>
i’ll likely open a ticket. i have flat and graph profiler results that show it spends a majority of its time in Kernel.Integer and Kernel.Float
<cremes>
when converting incoming fields.
<cremes>
btw, i’m using the stdlib csv
nateberkopec has joined #jruby
brauliobo_ has joined #jruby
<mberg>
My usual solution for the problem of "using X pure ruby library is slow compared to MRI" is "using Y java alternative is breath-takingly faster than using X on either runtime"
<mberg>
I haven't tried that with CSV though. If possible, I would probably give Commons CSV a shot.
<cremes>
mberg: thanks for the pointer. i’ll look for it.
<mberg>
Obviously not always an option, especially if you have a lot of logic written against the Ruby module, or if running on MRI is a functional requirement.
brauliobo has quit [Ping timeout: 265 seconds]
<cremes>
mberg: looks like commons csv is an apache project. searching rubygems.org doesn’t show any ruby wrapper for it, unfortunately.
<mberg>
Yeah, none that I know of. For most things I just use the jars directly.
havenwood has joined #jruby
bbrowning_away is now known as bbrowning
Locke23rus has quit [Remote host closed the connection]
shellac has joined #jruby
tcrawley-away is now known as tcrawley
<xardion>
cremes: honestly, MRI's CSV isn't a whole lot better than jRuby. They're both dog slow compared to pretty much anything you could do with Java directly.
<cremes>
xardion: for my use-case, mri is about 10x faster parsing csv than jruby
<xardion>
Alot of that has to do with extra logic that you may or may not need.
<xardion>
Oh, yeah, the parsing is definitely alot slower in jRuby.
<cremes>
by the time i wedge in a java library, i could have probably run it under mri twice
<xardion>
Most of what I deal with is outputting CSV, and very large amounts of it.
<cremes>
i was looking for a quick fix… sounds like one doesn’t exist… oh well
havenwood has quit [Ping timeout: 244 seconds]
<cremes>
xardion: and do you use commons csv or some other lib?
<xardion>
I'm just writing it directly.
<cremes>
i see
<xardion>
In my particular case, I'm taking a resultset and driving it directly into a tcp socket as CSV
<xardion>
My results are already properly quoted where necessary, so I'm just writing the output of getString directly to the socket, then a comma (or a newline if it's the last column), for each column.
havenwood has joined #jruby
<cremes>
ok
<xardion>
the bottleneck in my case is how fast the db cursor can return data to me.
skade has joined #jruby
pitr-ch has quit [Ping timeout: 255 seconds]
pitr-ch_ has joined #jruby
r0bby_ has quit [Ping timeout: 250 seconds]
hoodow has joined #jruby
Aethenelle has quit [Quit: Aethenelle]
phrinx has joined #jruby
thsig has quit [Remote host closed the connection]
samg_ has joined #jruby
vjdhama_ has joined #jruby
thsig has joined #jruby
vjdhama has quit [Ping timeout: 246 seconds]
subbu is now known as subbu|lunch
tcrawley is now known as tcrawley-away
<GitHub73>
[jruby] nirvdrum pushed 1 new commit to master: http://git.io/vnQls
<GitHub73>
jruby/master b40bc95 Kevin Menard: Use popen3 instead of `` for pack200 operations to drain STDIO....
skade has quit [Quit: Computer has gone to sleep.]
<GitHub134>
[jruby] nirvdrum pushed 1 new commit to truffle-head: http://git.io/vnQl4
<GitHub134>
jruby/truffle-head fef441c Kevin Menard: Merge remote-tracking branch 'origin/master' into truffle-head
shellac has quit [Ping timeout: 265 seconds]
<samg_>
I'm trying to precompile ruby files, but I'mg getting an error when I try to load the class file that `/path/to/file.class` is not compiled Ruby; use java_import to load normal classes`
<GitHub51>
[jruby] nirvdrum commented on commit b40bc95: @mkristian This tested out okay for me, but please review when you have a moment. http://git.io/vnQ4v
<samg_>
I can reproduce by just running `jrubyc init.rb; jruby init.class`
<xardion>
samg_: jrubyc produces a java class. You run it with java, not jruby.
<samg_>
xardion: Thanks. Is it the case that what I'm trying to do used to work? Because I'm copying the method from warbler, which claims to do the same thing: https://github.com/jruby/warbler#features (under "compiled")
<xardion>
samg_: warbler is doing something completely different. I'm not sure what you're asking.
pitr-ch_ has quit [Ping timeout: 265 seconds]
<xardion>
Oh, I think I see.
<samg_>
Warbler runs jrubyc and leaves stub files that load the class file, and I tried doing the same thing.
<xardion>
samg_: There's an important bit in that link you pasted: NOTE: The war file will still contain .rb files, but they will be short stubs containing the following code : load __FILE__.sub(/\.rb$/, '.class')
<samg_>
Right, and that's what I have, and the error I get is on that line in the stub file.
<xardion>
Oh, you tried doing that and it failed.
<samg_>
Full error: Exception in thread "main" org.jruby.exceptions.RaiseException: (LoadError) /var/folders/z1/sdzkzrw94b1dttp72spg4fd00000gn/T/wunderboss6675251160404711331/app/main.class is not compiled Ruby; use java_import to load normal classes
<samg_>
Maybe this document is wrong or out of date-- and if so, is there an alternative? My ultimate goal is to make it a bit harder for someone to grab the source for my app.
yfeldblum has quit [Ping timeout: 240 seconds]
<xardion>
I'm not sure what to tell you there, that particular method of doing that might be deprecated.
<samg_>
OK, thanks for your time :)
<xardion>
well, you don't have to have a wrapper script like that
<projectodd-ci>
kevin: Use popen3 instead of `` for pack200 operations to drain STDIO.
<mberg>
Huh. Yeah, CSV on jruby is pretty damn slow, especially on a first iteration. Parsing a 160k line csv file and building an array of the first field: first run is ~ 15 seconds, subsequent iterations drop to ~ 5 seconds. Under MRI it's around 3 seconds, period.
<mberg>
On the other hand, doing the same thing with CSVParser is ~ 2 seconds on the first iteration, then sub-second on subsequent iterations.
<xardion>
I think there are ways to speed up the jRuby CSV parsing by disabling certain features you know you don't need.
<xardion>
and also by explicitly defining some of the options when you spin up a new CSV object instead of just letting it default
djbkd has quit [Remote host closed the connection]
<nirvdrum>
Okay. 9k in general needs a flag for AOT to work.
<nirvdrum>
-Xaot.loadClasses=true, I think.
samphippen has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<nirvdrum>
If that doesn't do it, I guess you'll need to wait for headius to show up.
<mberg>
Always room for optimization. I was just curious to look at what baseline performance was like, since cremes mentioned mri was about 10x faster.
<nirvdrum>
mberg: What CSV file are you using? Is it something public?
<cremes>
nirvdrum: I can provide you a nice test case if you want one :)
<rtyler>
so in my embedding scenario, I'm getting a RubyObject back, which is an actual class, is there anything in redbridge that allows for calling methods more directly on that object or anything else like that?
skade has joined #jruby
<samg_>
xardion: nirvdrum: Just to follow up, downgrading to 1.7.22 seems to work.
bbrowning is now known as bbrowning_away
donV has quit [Read error: Connection reset by peer]
donV has joined #jruby
vjdhama_ has quit [Remote host closed the connection]
havenwood has joined #jruby
Aethenelle has quit [Quit: Aethenelle]
temporalfox has joined #jruby
r0bby_ has joined #jruby
nirvdrum has quit [Ping timeout: 240 seconds]
drbobbeaty has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
samg_ has quit [Quit: leaving]
skade has quit [Ping timeout: 250 seconds]
havenwood has quit [Ping timeout: 255 seconds]
Aethenelle has joined #jruby
havenwood has joined #jruby
yfeldblum has joined #jruby
djbkd has quit [Remote host closed the connection]
oblutak has quit []
Puffball has joined #jruby
djbkd has joined #jruby
djbkd has quit [Remote host closed the connection]
r0bby_ has quit [Quit: Konversation terminated!]
pitr-ch has quit [Read error: Connection reset by peer]
r0bby_ has joined #jruby
pitr-ch has joined #jruby
r0bby_ has quit [Client Quit]
djbkd has joined #jruby
brauliobo has joined #jruby
brauliobo_ has quit [Ping timeout: 264 seconds]
bb010g has quit [Quit: Connection closed for inactivity]
Aethenelle has quit [Quit: Aethenelle]
havenwood has quit [Ping timeout: 268 seconds]
r0bby_ has joined #jruby
r0bby_ has quit [Client Quit]
r0bby_ has joined #jruby
cristianrasch has quit [Quit: Leaving]
rcvalle has quit [Quit: rcvalle]
asarih has quit [Ping timeout: 240 seconds]
guilleiguaran__ has quit [Ping timeout: 240 seconds]