Data Size In Loading Data Widget

Answered
Majar K asked on January 2, 2019

Hi,
 
When I generate a report I get a widget which says " Loading Data xxxxx K". What does the K stand for? Is it KB or something else? Could you please clarify?
Regards,
Majar

9 answers

Public
Tanya Gryshko Tanya Gryshko Flexmonster January 2, 2019

Hello, Majar,
Thank you for writing!
The K on the "Load data" widget stands for KB.
In case you would want to replace the 'K' with your custom text, check out the Localizing component tutorial. Localization can be used to change this label.
Please let me know if you have any other questions.
Regards,
Tanya

Public
Majar K January 3, 2019

Thanks Tanya, But for a report it is showing around 2,000,000K. But the response size is only around 400 KB. Could you please clarify how the size in the widget is being calculated?
 
Please note we are generating report using csv compressor
 
Regards,
Majar

Public
Ian Sadovy Ian Sadovy Flexmonster January 3, 2019

Hello Majar,
 
Thank you for the details.
We have checked CSV compressor and it seems that there is an issue with KB formatting (value should be divided by 1024).
The fix will be available in the next minor release (ETA Jan 28).
 
Still, it's not clear why it can be 2000 KB instead of 400 KB.
Could you please provide us with your CSV sample file and specify the Data Compressor technology (PHP, Java, .NET)?
 
Look forward to hearing from you.
 
Regards,
Ian

Public
Majar K January 3, 2019

Hi Ian,
Thanks for the support. We are using .Net.
I'm sorry because I wrongly mentioned that .csv implementation link, but we are using relational database(https://www.flexmonster.com/doc/connecting-to-relational-database-with-net/).

The report(response size 1.0MB) is taking more than 30 seconds (after the 'loading for the response' changes to 'xxxxxxK 'in widget) to generate. After checking the response I could find that it is the content download time. But I think it is too long because the size is just 1 MB. Why is it?
Regards,
Majar

Public
Tanya Gryshko Tanya Gryshko Flexmonster January 4, 2019

Hello, Majar,
Thank you for a quick update and specifying the additional details.
Please have a look at our best practices for performance optimization:

  • Use a streaming approach to return data from the server (there are samples in the documentation). So the data loading and analyzing will be simultaneous (and faster as a result).
  • Use data prefiltering to load only necessary data to the client’s browser.
  • Cache compressed responses (for example on the server file system) to avoid frequent queries to the database and save time.
  • Configure GZIP compression on the server.

Following these practices should decrease data loading time.
Please let us know if applying the best practices helps.
Regards,
Tanya

Public
Majar K January 7, 2019

Hi Tanya,
Thanks, We will try to configure GZIP compression. But I don't think It should not take >30 s to download content of 1 MB .

Regarding streaming response:- We are currently using streaming approach to return data from the server as mentioned in the documentation. While debugging I found out that writing to response.Content is taking time(>30s,which is the download time of response). The report will be loaded only after the writing(to response.Content) operation completes. I'm not sure it is the expected behavior.
Thanks,
Majar

Public
Majar K January 7, 2019

Hi Tanya,
I implemented GZip Compression, The response size and the content download time are reduced, but the Waiting(TTFB) time is increased as GZip compression waits for the response.Content to be written. The time to generate the report is same.
Regards,
Majar

Public
Dmytro Zvazhii Dmytro Zvazhii Flexmonster January 9, 2019

Hello Majar K,
Thank you for your feedback.
We are not able to reproduce the same behavior where the response takes too much time.
Could you please provide us with the sample project for reproducing the issue? We would need a database sample and a code example which generates the response. Also could you please specify what version of the component and compressor you are using?
That information will help us a lot in our further investigation.
Regards,
Dmytro

Public
Dmytro Zvazhii Dmytro Zvazhii Flexmonster January 29, 2019

Hello Majar K,
We are glad to inform you that the latest version of the component includes the fix for KB formatting.
You are welcome to update the component and try it.
Regards,
Dmytro

Please login or Register to Submit Answer