Export of Data table

Hi,

Right now I am exporting the DataTable using your online services. I want to switch the export to our server. I have downloaded and unzipped the PHP packages for pdf and excel in the server root. I have used the below code to call:

$(‘Grid’).exportToPDF(); //old working code
$(‘Grid’).exportToPDF(“generate.php”); //new code

The file “generate.php” gets downloaded instead of the datatable. I am using Apache 2.2 through wamp server and a dll at server end.

with Regards
Ashok

Tried this too…
$(‘Grid’).exportToPDF(“mywebite.com/generate.php”); //new code

The file “generate.php” gets downloaded instead of the datatable.

  • Be sure that you are loading page by http and your server correctly process php files

  • Check web-server logs, if some error occurs during php processing - it will be store there.

Thank you. Problem solved. Wrong configuration in Apache for php.

Regards
Ashok

Hi,

While the datatable is getting exported in our own server, it is much slower than compared to export from your website. Tables with over 300 rows is taking around 90 sec to export to an excel. PDF export around 15 sec . Our server has 4 vCPUs and 8GB of ram and runs on Windows server 2008, apache2.2 and PHP 5.3.5. Do we need to tweak anything in the PHP ini files or Apache?
Thanks

With Regards
Ashok

Hi, I’m not quite sure why the performance difference is such huge. Default export server is very small instance ( 1 CPU, 512 Mb ), so in your case export must run much more faster.

By the way, default export service is Java based, but php version works with comparable performance.

Thanks for your reply. We shifted the export to our server because of security concerns by a large customer. I have increased the memory limit in PHP ini file to 1028MB with no effect. My DataTable contains only 7 columns and 500 rows of data. It actually takes only 3 secs to display via SQL but the Excel export via PHP in our server takes close to 90 sec. Can you please duplicate a table of this type and check it out the PHP generator at your end?

Thanks
Ashok

The dataset of similar size takes less than second on local php installation

Try to change in generate.php

$excel = new gridExcelGenerator();

to

$excel = new gridHTMLGenerator();

It will change export engine to faster one.

Thanks for your response. Changed it. However, the report is not getting downloaded. New Tab opens and freezes. We are still using 1.9 version.

Ashok

The export is mostly server side functionality so version of client side lib doesn’t matter.

If you think that problem is caused by export code, please provide some example of dataset for which performance issue occurs. As similar dataset works much faster locally, problem most probably is not related to the data but related to the server’s configuration

thanks for your reply. The dataset is a treeview grouped over the first column. I am pasting the partial exported table below. The full table has around 500 rows.

Descriptive Statistics Report - Parameter								
Parameter_Name	Workunit Name	Count	Min	Max	Range	Mean	Stdev	CV%
Charging_Efficiency								
	Amar Splints	147	86	97	11	90.67	1.873	2.07
	Bilal-Ahsic-Mechanised	456	86	97	11	94.28	1.743	1.85
	Bilal-Superfine	396	90	98	8	94.56	1.772	1.87
	Kayath Products	306	82	100	18	90.74	3.352	3.69
	President-Gentle	150	85	99	14	94.11	1.901	2.02
	President-Golden	138	86	99	13	94.04	1.828	1.94
	Sanjeevani-Sanjeevani	441	84	95	11	90.95	2.37	2.61
IP_Burn_Time_40mm								
	Amar Splints	784	2	24	22	20.19	1.511	7.48
	Bilal-Ahsic-Mechanised	2,431	1	27	26	16.26	2.342	14.4
	Bilal-Superfine	2,112	10	25	15	15.26	2.65	17.36
	Kayath Products	1,632	9	25	16	20.72	1.275	6.15
	President-Gentle	800	10	28	18	15.7	2.399	15.28
	President-Golden	735	10	21	11	16.06	2.126	13.24
	Sanjeevani-Sanjeevani	2,352	16	25	9	20.01	1.741	8.7
IP_Count40								
	Amar Splints	784	36	439	403	42.06	14.3	34

This is there a way I can attach the dataset?

I have tried to use data as above one ( repeated, to be more than 500 rows in total ) and it takes 1-2sec locally to export the file.

Thank you for trying this out at your end. As you suggested, maybe it is our Apache server 2.2 configuration. Can you please recommend the correct configuration?

With regards
Ashok

I can share the DigitalOcen droplet that works fast enough for me, but it is a default Ubuntu LAMP stack, without any custom configurations.

Ok. Thank you. Our OS is windows Server. So, not sure if that is making a difference.

With regards
Ashok

Our dev environment is Windows ( default Apache and PHP settings ) and performance there while is a bit slower still fast enough.

The speed problem is solved by commenting out loading of dll in
XDEBUG in PHP.ini file. Thanks for your help.

Ashok