Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
JS96185262yA 120 MB HTML file with calculated statistics based on data fetched with tens of thousands of SQL queries… and they wonder why it takes 30 minutes for a Visual Basic 6.0 software to do this shit.
-
@JS96 It sounds like that wasn't what you had in mind when writing the software.
But the statement about the number of SQL queries leads me to assume that there might be more than an order of magnitude of optimization potential which has nothing to do with what language the software has been written in... -
asgs115632yI think the export as option shouldn't be made available if it exceeds certain limits (say 1 MB)
-
JS96185262y@Oktokolo the SQL mention was to explain it’s a lot of data. That part is almost instant, the most time is wasted during the HTML writing in this case. Imagine a table with 200k cells.
VB 6 executables are not the fastest in memory allocation. -
JS96185262y@asgs unfortunately for law compliance the user must be able to generate custom reports that he can export.
So no export limits are allowed, but of course the software allows you to export portions, use filters, etc. to reduce the size and store only the most important data. -
@JS96 So it comes down to the cost of string concatenation?
StringBuilder should solve that. Maybe an approach avoiding concatenation in your code could work even better: Give all the parts to a StreamWriter and let it do what it has been optimized for.
Related Rants
The client: "I'm trying to export as HTML a few data we collected in 1 month with your software, why does it take so much???"
The length of the generated HTML file for the "few data":
rant
client
right