AIR httpservice - 加载时间

时间:2011-10-21 10:37:53

标签: actionscript-3 flex air

我在AIR中使用了一些HTTPService。这比我想加载的时间更长。 实际上,在数据网格中填充大约17000行,大约需要5秒。 有没有办法减少这个时间。

由于

<?php
    include 'functions.php';
    require_once 'MySQL.php';
    require_once 'conf.php';



    header('Content-Type: text/xml');
    $dbc = mysqli_connect(DB_HOST, DB_USER, DB_PWD, DB_DATABASE);
    if (mysqli_connect_errno()) {
        printf("Échec de la connexion : %s\n", mysqli_connect_error());
        exit();
    }

    // If a connection was established, run the query:
    if ($dbc) { 
        // Define the query:
        $q ='SELECT 20Patients_1012.paIndex, 20Patients_1012.paNomP, 20Patients_1012.paPrenom, 20Patients_1012.paCodePostal, 20Patients_1012.paDossier1, 20Patients_1012.paDossier2, 20Patients_1012.paNaissance, 20Patients_1012.paNumTel1, 30Traitemnt_201223.ttTStatutP, 30Traitemnt_201223.ttDateStatut, 12Praticien_02.prInitiales FROM 20Patients_1012 JOIN 30Traitemnt_201223 ON 20Patients_1012.paIndex = 30Traitemnt_201223.ttIndex JOIN 12Praticien_02 ON 30Traitemnt_201223.ttPraticien = 12Praticien_02.prIndex';
        }

    // Run the query:
        $r = mysqli_query($dbc, $q);

            $reponse = "<patients>";


        // Confirm that some rows were returned:
        if (mysqli_num_rows($r) > 0) {
            // Fetch every row and print it as XML:
            while ($row = mysqli_fetch_array($r, MYSQLI_NUM)) {
     $reponse.="<patient><id>".$row[0]."</id>";
         $reponse.="<pa>".utf8_encode($row[1])."</pa>";

      $reponse.="<pr>".$row[10]."</pr>";


      $reponse.="</patient>";

                } 
        } 
                $reponse.="</patients>";

    echo $reponse;

    ?>

0 个答案:

没有答案