This repository has been archived by the owner on Jul 25, 2021. It is now read-only.
Dramatically improves the performance of the export function #195
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #193 , Here is a summary of the changed
Performance improvement during load: in the previous version, the html-table is parsed on page load and the parsed data is stored in a variable ready to export.
Problem: The problem with this approach is that it slows down the script on page load. No, every user ends up exporting the data so parsing the data on page load is a waste of resources and caused the browser to complain about the script.
Solution: To fix this issue, I changed the events' orders by moving the paring code away from the initialization process. So the plugin gets initialized during page load ready to be executed and later the export code gets fired when the user clicked the export buttons.
Performance improvement during export: in the previous version, the html-table is parsed multiple times (depends on how many formats are available) and then that data gets stored in the session.