Major FVNC changes

| 2 Comments | No TrackBacks

FVNC is now officially on steroids.

Over the past few weeks I've been silently working on increasing the performance of FVNC. I'm happy to announce that I was able to dramatically improve rendering speed, as well as majorly reduce required CPU and memory usage. It all boiled down to coming up with an intelligent way to handle the asynchronous nature of the flash.net.Socket class.

Previously, my approach was this:

  • Copy the socket data into a buffer. Try to read a server message from the buffer. Encounter an EOFError when not enough data was available. Reset the buffer to the beginning. Wait until more socket data arrives. Try again to process a complete message.

The new approach is this:

  • When socket data arrives, build a parse tree that starts creating server messages. If not enough data is available, no big deal. The parse tree saves what is was working on last. When data arrives again it successfully picks up where it left off. On every enterFrame of the Flash Player (when screen redraws happen), check to see if any messages have completed, and if so then update the display.

The new approach is dramatically better in terms of speed and resources. I can't stress enough just how much more responsive FVNC was in my local testing -- it's like an entirely new application.

The good stuff is in revision [7]. I'm really pleased with how the parser turned out for dealing with asynchronous socket data. I hope you enjoy the changes!

No TrackBacks

TrackBack URL: http://www.darronschall.com/mt/mt-tb.cgi/141

2 Comments

  • Any reason this can't be made to work with Mac web browsers?

     
  • Hi digason,

    FVNC runs on Flash Player 9, which means it works on Windows, Mac, and Linux.

    The biggest problem you might encounter is dealing with the Flash Player security sandbox since it doesn't allow connections to VNC servers over high ports (VNC uses 5900 by default). By using a cross-domain policy file on the server being connected to, you can get around the connection security restrictions by specifically allowing connections on that port.

     

Leave a comment

Flex.org - The Directory for Flex

Archives