Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added skip_html_diff parameter #1329

Merged

Conversation

matthewhegarty
Copy link
Contributor

@matthewhegarty matthewhegarty commented Sep 21, 2021

Problem

This is a performance improvement when importing large numbers of rows.

If one is not using the Admin site, then there is no need for the as_html() call to be made for each row.

Solution

This PR adds a new meta attribute skip_html_diff which is used to skip the as_html() call if enabled.

I've also tested and documented the performance differences.

I also pulled in some of the documentation changes from #1274, including instructions on running performance tests using the supplied script.

Acceptance Criteria

I have added a new unit test and manually tested imports. Obviously the HTML report doesn't render on the confirmation page in the admin site if this is enabled, but import still works via the Admin site.

@coveralls
Copy link

coveralls commented Sep 27, 2021

Coverage Status

Coverage increased (+0.001%) to 98.073% when pulling e8a6639 on matthewhegarty:skip-html-diff into fd65990 on django-import-export:main.

@matthewhegarty matthewhegarty force-pushed the skip-html-diff branch 2 times, most recently from 86a715e to b4de68e Compare November 14, 2021 11:30
@matthewhegarty matthewhegarty marked this pull request as ready for review November 14, 2021 11:31
matthewhegarty added a commit to matthewhegarty/django-import-export that referenced this pull request Dec 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants