[Laszlo-checkins] r9518 - openlaszlo/trunk/WEB-INF/lps/lfc/data
hqm@openlaszlo.org
hqm at openlaszlo.org
Mon Jun 9 08:23:06 PDT 2008
Author: hqm
Date: 2008-06-09 08:23:04 -0700 (Mon, 09 Jun 2008)
New Revision: 9518
Modified:
openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataset.lzs
openlaszlo/trunk/WEB-INF/lps/lfc/data/LzHTTPDataProvider.lzs
Log:
Change 20080609-hqm-x by hqm at badtzmaru.home on 2008-06-09 10:44:33 EDT
in /Users/hqm/openlaszlo/trunk2
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: update loadtime for dataset
New Features:
Bugs Fixed: LPP-5315
Technical Reviewer: a.bargull
QA Reviewer: pbr
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details:
Not sure why getLoadTime was deprecated on LzDataset, but I un-deprecated it, because
there really isn't a better way to get the loadtime right now because there is no public
API for getting the dataRequest from the dataset (maybe there should be?)
Tests:
test case from bug report runs in swf,swf9,dhtml
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataset.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataset.lzs 2008-06-09 14:46:47 UTC (rev 9517)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataset.lzs 2008-06-09 15:23:04 UTC (rev 9518)
@@ -555,10 +555,7 @@
* @return Int: Number of miliseconds it took to load the last request.
*/
function getLoadTime( ) {
- if ( $debug ){
- Debug.info("%w.%s is deprecated. Look at `%w.loadtime` object instead.",
- this, arguments.callee, this.dataRequest);
- }
+ return this.dataRequest.loadtime;
}
/**
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/data/LzHTTPDataProvider.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/data/LzHTTPDataProvider.lzs 2008-06-09 14:46:47 UTC (rev 9517)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/data/LzHTTPDataProvider.lzs 2008-06-09 15:23:04 UTC (rev 9518)
@@ -220,6 +220,8 @@
url = lzurl.toString();
}
+ dreq.loadstarttime = (new Date()).getTime();
+
dreq.status = "loading";
tloader.open ( proxied ? "POST" : dreq.method, url, /* username */ null, /* password */ null);
tloader.send (/* content */ postbody);
@@ -248,6 +250,7 @@
*/
function loadTimeout( loader, data ) {
var dreq = loader.dataRequest;
+ dreq.loadtime = (new Date()).getTime() - dreq.loadstart;
dreq.status = LzDataRequest.TIMEOUT;
dreq.onstatus.sendEvent( dreq );
}
@@ -272,6 +275,7 @@
// all its values.
var content = null;
+ dreq.loadtime = (new Date()).getTime() - dreq.loadstarttime;
if (data == null) {
this.setRequestError(dreq, "client could not parse XML from server");
@@ -382,6 +386,7 @@
@type Number
*/
var loadtime = 0;
+ var loadstarttime;
var secure = false;
var secureport;
More information about the Laszlo-checkins
mailing list