Yún performance issues

Hi,

I followed instructions on how to read analog input values and post them to a html page:

works fine, but i want to decrease the delay between subsequent accesses to less milliseconds.
I.e., when choosing an update interval of 5ms, the linux is at about 83% usage due to the permanent execution of the bridge.py script (found out via ssh, calling top and seeing bridge.py at the top with 83% cpu usage).
i am not able to achieve shorter times than approx. 240ms for the overall reading of an anlogue value and posting it to linino.
is their any way to accelerate this process?
the used sketch is below

/*
 Adapted "Temperature" web interface
  
 Based on http://arduino.cc/en/Tutorial/TemperatureWebPanel

 */

#include <Bridge.h>
#include <YunServer.h>
#include <YunClient.h>

// Listen on default port 5555, the webserver on the Yun
// will forward there all the HTTP requests for us.
YunServer server;

unsigned long time;

void setup() {
  Serial.begin(9600);

  // Bridge startup
  pinMode(13, OUTPUT);
  digitalWrite(13, LOW);
  Bridge.begin();
  digitalWrite(13, HIGH);

  // Listen for incoming connection only from localhost
  // (no one from the external network could connect)
  server.listenOnLocalhost();
  server.begin();
  
  time = millis();
}

void loop() {
  
  // Get clients coming from server
  YunClient client = server.accept();
  
  // There is a new client?
  if (client) {
    // read the command
    String command = client.readString();
    command.trim();        //kill whitespace
    
    Serial.print("Recognized command: ");
    Serial.println(command);
    
    // is "values" command?
    if (command == "values") {
      
      int sensorValue = analogRead(A1);
      // convert the reading to millivolts:
      float voltage = sensorValue * (5000 / 1024);
      // print the voltage:
      client.print("
Current voltage: ");
      client.print(voltage);
      client.print("mV.");
      
      unsigned long current = millis();
      client.print("
Timediff: ");
      client.print(current - time);
      client.print("ms.");
      
      Serial.print("Timediff: ");
      Serial.println(current - time);
      
      time = millis();
    }

    // Close connection and free resources.
    client.stop();
  }
  
  // Poll every 2ms (500Hz)
  delay(5);
}

Unfortunately, not any that I'm aware of. Most of those 240ms are spent executing programs (like date) on the linux side. Each time the loop spins, new processes are started, executed and terminated. This is time consuming.
At least IMHO this is much more related to the speed of the cpu running linux than to the speed of the Bridge. I'll be happy to be proved wrong and any hints are welcome

If you have specs that make you update every 5ms or so, you will have to use a different approach which prevents starting and stopping processes all the time. Make a process that runs all the time and takes the result from your sketch and does e.g. WebSocket communication with your HTML clients.
A simple solution could be that you write your values to a file and have some python script monitoring the file and send the new values to the web. For a python based WebSocket Server have a look at http://www.tornadoweb.org or go all the way to node.js.
A more advanced solution would enable a more direct communication between your sketch and python by skipping bridge at all.