Re: [MacRuby-devel] A QtRuby Version of The GC2 Client has Been Created

2012-11-23 Thread J Silver

Thanks Josh !

I can see how this would be a problem with GVL. I was able to get it 
acceptable by limiting log size to 20 messages instead of sending entire 
log mandatorily. Small change allowed the server not to choke the client 
as much. Only reason I read every 1 byte is to try to allow n-sized 
multi-line messages. Not sure how I would add message sizes to the 
protocol, though it could be in like a LENGTH message, then sending the 
longer one and using #read to get the size of the buffer. I think that 
you're right in saying that can speed it up to 100% of the MacRuby and 
RubyMotion speed ( fast ).



On 23/11/2012 05:11, Joshua Ballanco wrote:

On this line:

https://github.com/jsilverMDX/GlobalChat2/blob/master/gc2-qtruby/global_chat_controller.rb#L90

you're reading in a byte at a time. That, combined with the GVL, can 
seriously slow things down. You can either increase the number of 
bytes you're reading each loop or, ideally, use TCPSocket#read with a 
buffer. It's a bit more work to get right, but it should resolve your 
performance issues.


Cheers,

Josh

On Thursday, November 22, 2012 at 11:23 PM, J Silver wrote:


http://cl.ly/image/2w0P1X3H1v3T
http://cl.ly/image/3Q3j260q1s1F

Want to report success using QtRuby library with the qtbindings gem.

Internally, Able to use Signals and Slots through the advanced
techniques described around the web.

Now have a working version of the chat available in the GlobalChat2
repository.

https://github.com/jsilverMDX/GlobalChat2/tree/master/gc2-qtruby

It runs on 1.8.7 and 1.9.3. It lacks many of the features of the
advanced MacRuby client coming soon to App Store.

It uses QtDesigner for the GUI files with the UI loader and should run
natively on Mac, Windows and Linux.

However, one thing. The MacRuby client is DAYS faster getting a big log
back from the server than QtRuby, and the signal is obviously not to
blame. This happens on both 1.9 and 1.8.7. Any ideas?


HAPPY TURKY DAY!

jsilver
___
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org 
mailto:MacRuby-devel@lists.macosforge.org

http://lists.macosforge.org/mailman/listinfo/macruby-devel




___
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo/macruby-devel


___
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo/macruby-devel


Re: [MacRuby-devel] A QtRuby Version of The GC2 Client has Been Created

2012-11-23 Thread J Silver

I've created a ticket about this, 4.0 support planned.

Thanks !

On 23/11/2012 05:11, Joshua Ballanco wrote:

On this line:

https://github.com/jsilverMDX/GlobalChat2/blob/master/gc2-qtruby/global_chat_controller.rb#L90

you're reading in a byte at a time. That, combined with the GVL, can 
seriously slow things down. You can either increase the number of 
bytes you're reading each loop or, ideally, use TCPSocket#read with a 
buffer. It's a bit more work to get right, but it should resolve your 
performance issues.


Cheers,

Josh


___
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo/macruby-devel


Re: [MacRuby-devel] A QtRuby Version of The GC2 Client has Been Created

2012-11-23 Thread Mark Villacampa
Cool! :)

I'm glad you found QtRuby useful, I might actually be the best option for 
cross-platform ruby GUI apps :)

BTW, how big is the executable on each OS? Does it bundle ruby? This is my main 
concern about MacRuby :/

Sent from my iPhone

On 23/11/2012, at 18:54, J Silver jsilverm...@gmail.com wrote:

 I've created a ticket about this, 4.0 support planned.
 
 Thanks !
 
 On 23/11/2012 05:11, Joshua Ballanco wrote:
 On this line:
 
 https://github.com/jsilverMDX/GlobalChat2/blob/master/gc2-qtruby/global_chat_controller.rb#L90
 
 you're reading in a byte at a time. That, combined with the GVL, can 
 seriously slow things down. You can either increase the number of bytes 
 you're reading each loop or, ideally, use TCPSocket#read with a buffer. It's 
 a bit more work to get right, but it should resolve your performance issues.
 
 Cheers,
 
 Josh
 
 ___
 MacRuby-devel mailing list
 MacRuby-devel@lists.macosforge.org
 http://lists.macosforge.org/mailman/listinfo/macruby-devel
___
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo/macruby-devel


Re: [MacRuby-devel] A QtRuby Version of The GC2 Client has Been Created

2012-11-23 Thread J Silver
Yes QtRuby works great. I didn't have any success bundling on OS X. I 
tried Platypus but it didn't work. QtRuby doesn't seem to have any 
packager. However, there are reports that it works with Ruby-OCRA on 
Windows to make an exe. I think that when used with OCRA it will make an 
exe with all gems and a Ruby.


Jon

On 23/11/2012 13:35, Mark Villacampa wrote:

Cool! :)

I'm glad you found QtRuby useful, I might actually be the best option for 
cross-platform ruby GUI apps :)

BTW, how big is the executable on each OS? Does it bundle ruby? This is my main 
concern about MacRuby :/

Sent from my iPhone

On 23/11/2012, at 18:54, J Silver jsilverm...@gmail.com wrote:


I've created a ticket about this, 4.0 support planned.

Thanks !

On 23/11/2012 05:11, Joshua Ballanco wrote:

On this line:

https://github.com/jsilverMDX/GlobalChat2/blob/master/gc2-qtruby/global_chat_controller.rb#L90

you're reading in a byte at a time. That, combined with the GVL, can seriously 
slow things down. You can either increase the number of bytes you're reading 
each loop or, ideally, use TCPSocket#read with a buffer. It's a bit more work 
to get right, but it should resolve your performance issues.

Cheers,

Josh

___
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo/macruby-devel

___
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo/macruby-devel


___
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo/macruby-devel