You are not logged in.
Pages: 1
All,
I am struggling with load times on my site while using the php client. I can successfully connect to the server and get data. Here are the queries that I am using to query the data:
$thirdResults = $myIMSClient->Search_GeneralSearch(array("query"=>"$doit"));
$popURL = $thirdResults['files'][0]['previewUrl'];
$popID = $thirdResults['files'][0]['id'];
$metaResults = $myIMSClient->Metadata_GetMetadata(array("itemId"=>"$popID", "type"=>"file"));
$popSku = $metaResults['empireSKU'][0]['value'];
$popDesc = $metaResults['empireDescription'][0]['value'];
$popPatt = $metaResults['empirePattern'][0]['value'];
$popMat = $metaResults['empireMaterialType'][0]['value'];
$popApp = $metaResults['empireApplication'][0]['value'];
$popSpec = $metaResults['empireSpecieName'][0]['value'];
$popSpecSku = $metaResults['empireSpecieSKU'][0]['value'];
$popDim = $metaResults['empireFullDimensions'][0]['value'];
The website displays items from the client that can be ordered, and uses their images and meta data from third light to populate the details. I applied this update about 3 weeks ago, and had to reduce the number of results per page from 100 results down to 15 and the load times are still higher than I am comfortable with (almost 2 seconds to load a page of 15 results).
I need to acquire both an image and the meta details associated with that image. I've done this by first querying the image and getting the ID (I don't have access to this ID prior to the query), then I query for the meta details using this ID.
A few additional details:
Roughly 4000 users this website weekly.
The server this site is hosted on is located in California, USA.
The folder I am searching for these details in is 5.4gb in size.
Please advise how I can improve my load times. Thank you!
Offline
Hi,
I'd recommend changing the search call that you are making to include the metadata fields, e.g. change it to:
$thirdResults = $myIMSClient->Search_GeneralSearch(array("query"=>"$doit", "fields" => array("metadata" => true)));
and then get the metadata from the search response, rather than making separate GetMetadata calls, e.g.:
$popSku = $thirdResults['files'][0]['metadata']['empireSKU'];
If that doesn't help, we'll need to see more of your code in order to advise further. It might also be worth adding some bits of timing around various bits of your code to track down where the bottlenecks are (e.g. using microtime(true)).
Best wishes,
Chris
Offline
Pages: 1