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

fix: allow exporting large reports that can't be rendered #25395

Merged
merged 3 commits into from Mar 13, 2024

Conversation

ankush
Copy link
Member

@ankush ankush commented Mar 13, 2024

Datatable can't handle >100K rows.. even if we make it render it still won't be "usable" except for scrolling through the report.

Currently, users can't do anything about it as the rendering process itself crashes the browser and users can't even use export feature because of it.

image

Note: I can kinda render 100K rows locally but it becomes laggy and unusable real quick. It will crash for most users though.

Also minor fix in data table: frappe/datatable#197

@ankush ankush requested a review from a team as a code owner March 13, 2024 10:59
@ankush ankush requested review from akhilnarang and removed request for a team March 13, 2024 10:59
@github-actions github-actions bot added the add-test-cases Add test case to validate fix or enhancement label Mar 13, 2024
Copy link
Member

@akhilnarang akhilnarang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a minor thing

frappe/core/doctype/prepared_report/prepared_report.py Outdated Show resolved Hide resolved
@ankush ankush marked this pull request as draft March 13, 2024 11:21
@ankush
Copy link
Member Author

ankush commented Mar 13, 2024

image

main culprit is visible rows computation (?)

@ankush ankush marked this pull request as ready for review March 13, 2024 12:32
@ankush ankush added frappe-support and removed add-test-cases Add test case to validate fix or enhancement labels Mar 13, 2024
perf fix for large data
avoid colons, windows doesn't like it
@ankush ankush merged commit 8937a94 into frappe:develop Mar 13, 2024
22 of 24 checks passed
@ankush ankush deleted the large_report_entries branch March 13, 2024 14:36
@ankush ankush added backport version-14-hotfix backport to version 14 backport version-15-hotfix Backport the PR to v15 labels Mar 13, 2024
ankush added a commit that referenced this pull request Mar 13, 2024
…-25395

fix: allow exporting large reports that can't be rendered (backport #25395)
ankush added a commit that referenced this pull request Mar 14, 2024
…25395) (#25404)

* fix: dont render very large reports, offer export instead

(cherry picked from commit 65fb8dc)

# Conflicts:
#	frappe/public/js/frappe/views/reports/query_report.js

* chore: conflicts

* fix: make excel export work without rendering

* fix: hide CSV option if not available

---------

Co-authored-by: Ankush Menat <ankush@frappe.io>
frappe-pr-bot pushed a commit that referenced this pull request Mar 19, 2024
# [14.68.0](v14.67.1...v14.68.0) (2024-03-19)

### Bug Fixes

* allow exporting large reports that can't be rendered (backport [#25395](#25395)) ([#25404](#25404)) ([b3f4d5d](b3f4d5d))
* allow transitioning to long text (backport [#25419](#25419)) ([#25474](#25474)) ([60d8c1c](60d8c1c))
* avoid closing filter popover on any date picker interactions ([0784e61](0784e61))
* Avoid setting filter on now/today button ([83766c0](83766c0))
* child table rating fields ([#25433](#25433)) ([#25435](#25435)) ([57cf161](57cf161))
* consider all datepicker elements ([#25426](#25426)) ([ad79301](ad79301))
* debounce filter refresh ([7f65916](7f65916))
* don't allow setting an invalid rating ([#22633](#22633)) ([#25432](#25432)) ([502b907](502b907))
* dont add trailing decimal separator ([#25389](#25389)) ([#25390](#25390)) ([08e8d8c](08e8d8c))
* escape text types before setting disp area ([#25520](#25520)) ([#25522](#25522)) ([e446770](e446770))
* escape value in multiselect pill ([#25516](#25516)) ([#25517](#25517)) ([dbcf783](dbcf783))
* filters can use more than 140 chars ([d04bff9](d04bff9))
* handle distinct for fieldname (backport [#25511](#25511)) ([#25514](#25514)) ([3344df0](3344df0))
* handle parent rename in child workspace ([c3d9e1f](c3d9e1f))
* hide datepicker after picking date ([39796ea](39796ea))
* Log ipython commands (backport [#25364](#25364)) ([#25367](#25367)) ([997628c](997628c))
* log mariadb console usage ([6f4981c](6f4981c))
* show attachments on notifications too ([#25443](#25443)) ([#25448](#25448)) ([3251586](3251586))
* skip virtual doctype in tags ([b2ae437](b2ae437))
* Skip virtual doctype rename for dynamic links ([#25479](#25479)) ([#25480](#25480)) ([f368236](f368236))
* Skip virtual doctypes while renaming ([#25473](#25473)) ([#25477](#25477)) ([c423223](c423223))
* validate homepage paths (backport [#25409](#25409)) ([#25411](#25411)) ([ee1c8e3](ee1c8e3))

### Features

* connect to redis sentinel for redis cache (backport [#25398](#25398)) ([#25449](#25449)) ([6ce4036](6ce4036))
* debug stuck process by sending SIGUSR1 (backport [#25502](#25502)) ([#25526](#25526)) ([95d1224](95d1224))
* move bulk print operation to the background (backport [#25358](#25358)) ([#25396](#25396)) ([4508239](4508239))
* Store printed PDF attachments on communication (backport [#25439](#25439)) ([#25447](#25447)) ([9b7a02f](9b7a02f))

### Performance Improvements

* cap max count on list views (backport [#25348](#25348)) ([#25463](#25463)) ([3bc5d8a](3bc5d8a)), closes [#25361](#25361)
* compact prepared report files ([0aa3c8e](0aa3c8e))

### Reverts

* Revert "feat: move bulk print operation to the background (backport #25358) (#25396)" (#25400) ([490f031](490f031)), closes [#25358](#25358) [#25396](#25396) [#25400](#25400)
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants