Author Topic: load time and appearance  (Read 4282 times)

dataSQL_

  • Pro Deluxe
  • Newbie
  • *
  • Posts: 48
    • View Profile
load time and appearance
« on: January 04, 2017, 06:34:10 am »
I believe I can resolve the time out issue.

Question please, I purchased ParamQuery believing that it was FAST in loading remote data as well as displaying / presenting that same data extremely well.

1.  My data, at present seems to have a long load time issue with only a few records.
2.  My grid looks horrible and the ROLL UP does not function.

I am going to review all your documentation this evening on how to resolve the visual issue.

I am going to create a default html table and see if the same time to load is a coding issue or a ParamQuery issue.

Any suggestions, greatly appreciated.

dataSQL_

  • Pro Deluxe
  • Newbie
  • *
  • Posts: 48
    • View Profile
Re: load time and appearance
« Reply #1 on: January 04, 2017, 09:19:45 am »
I found this on the forum.

http://paramquery.com/forum/index.php?topic=1888.0

"it shouldn't take more than a second to load data in grid in virtual mode irrespective of number of rows"

why would I need to create special code to extend the load time due to a time out error?

I am being mislead, something is not right, and I cannot yet figure it out.

Any thoughts?

I should not have to write special code with.ebextensions to extend the TIME OUT for less than 100 rows of data.

Please, the JSON string loads fast but PQGrid won't load it - the error message says PROXY ERROR, but the logs say TIME OUT.

Please, any thought?

I don't know everything, but with guidance, I can find the solution.


paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: load time and appearance
« Reply #2 on: January 04, 2017, 09:53:28 am »
Server ---- data over internet/ intranet --> Browser [ ParamQuery grid ]

Paramquery grid runs in browser, its virtual rendering makes the data rendering fast when data is available in browser. Data binding of ParamQuery grid is very fast ~100 ms.

Time out errors has nothing to do with ParamQuery grid, it means the server is slow.

Easy way to verify it is by opening the url (shared by you in previous post ) in the browser.
« Last Edit: January 04, 2017, 10:03:53 am by paramquery »

dataSQL_

  • Pro Deluxe
  • Newbie
  • *
  • Posts: 48
    • View Profile
Re: load time and appearance
« Reply #3 on: January 04, 2017, 10:28:01 am »
Amazon servers are not slow.

http://35.167.46.75/faces/index.xhtml

The JSON string loads locally instantly.

something in the index.xhtml is causing a delay to invoke the TIME OUT during load.

If the JSON string is not the delay, there is nothing else involved except the VIEW and the javascript function in the VIEW.

INDEX.XHTML

Code: [Select]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:c="http://java.sun.com/jsp/jstl/core">

<h:head>
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/themes/base/jquery-ui.css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"/>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js"/>
<h:outputStylesheet name="css/pqgrid.min.css"/>
<h:outputScript name="js/pqgrid.min.js"/>
<h:outputScript name="js/jquery.ui.touch-punch.js"/>

<script>
$(function()
{
var dataModel =
{
    error: function(a, b, c)
    { alert(b);
alert(c);
alert(a.responseText);
console.log(a.responseText);},

            location: "remote",
            dataType: "JSON",
            method: "GET",
           
            url: "queryreturn",
            getData: function (dataJSON) {
                return { curPage: dataJSON.curPage, totalRecords: dataJSON.totalRecords, data: dataJSON.data };
          }
    }
   
    var obj = {};
    obj.dataModel = dataModel;
    obj.width = 700;
    obj.height = 400;   
    obj.colModel = [
    { title: "Person ID", width:100, dataType: "int", dataIndx: "person_id"},
    { title: "Last Name", width:150,  dataType: "string", dataIndx: "lastname"},
    { title: "First Name", width:150, dataType: "string", dataIndx: "firstname"},
    { title: "Full Name", width:200, dataType: "string", dataIndx: "fullname"},
    ];
         
    $("div#grid_array").pqGrid( obj );
    });
</script>

</h:head>
<h:body>
Grid is below<br>
</br>
<div id="grid_array"></div>
</h:body>
</html>


paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: load time and appearance
« Reply #4 on: January 04, 2017, 02:36:41 pm »
The url from where you fetch json data is quite slow and there is a 502 proxy server error which has nothing to do with javascript in your view.

http://35.167.46.75/faces/queryreturn?pq_datatype=JSON&_=1483520368823

Grid won't be able to display data unless you provide data to it.