title: Javafx 2d text rendering speed up
body: <p>I am a little surprised that JavaFX do consume my CPU by showing simple floating text on a screen. </p>
  
  <p><strong>My question</strong> is there any option tweaks to turn on hardware acceleration for nodes like Text? To Use <strong>GPU</strong> and not CPU when rendering 2D primitives?</p>
  
  <p>Here is the simple example that consume up to 40% cpu on my 2.53Mhz core 2 duo + Nvidia 9600M GT. OS: Mac Os X. JavaFX 1.2; JRE 1.5</p>
  
  <p><strong>Edit:</strong> I put animation in the example to just simulate text scrolling. You can try and achieve the same CPU consuming by scrolling ListBox or some picture with no stopping.</p>
  
  <pre><code>package text2dacceleration;
  
  import javafx.stage.Stage;
  
  import javafx.scene.Scene;
  import javafx.scene.layout.VBox;
  import javafx.scene.transform.Transform;
  import javafx.scene.text.Text;
  import javafx.animation.*;
  
  def longLine = for (i in [1..45]) "{i}";
  def textNodes = for (i in [1..64]) Text{content: "{longLine} line number {i}"};
  var yoffset = 0.0;
  
  Timeline {
     repeatCount: Timeline.INDEFINITE
     autoReverse: true
     keyFrames: [
        KeyFrame { time: 0s values: [yoffset =&gt; 0.0]}
        KeyFrame { time: 1s values: [yoffset =&gt; 10.0]}]
  }.play();
  
  Stage {
      title: "Text nodes"
      width: 800
      height: 600
      resizable: false
      scene: Scene {
         content: [
           VBox {
              content: textNodes
              transforms: bind Transform.translate(0, yoffset);
           }]}}
  </code></pre>