Skip to content

render gst_breakup in frontend #3406

@sagarvora

Description

@sagarvora
Member

I was doing some perf profiling when I noticed that when loading a sales invoice, our "gst breakup" rendering takes ~60% of total loading time.. we should do it on client side or lazily if possible.

        1    0.000    0.000    0.038    0.038 /home/snv/Park/dev/apps/frappe/frappe/desk/form/load.py:22(getdoc)
        1    0.000    0.000    0.024    0.024 /home/snv/Park/dev/apps/frappe/frappe/desk/form/load.py:354(run_onload)
        1    0.000    0.000    0.024    0.024 /home/snv/Park/dev/apps/frappe/frappe/model/document.py:1109(run_method)
        1    0.000    0.000    0.024    0.024 /home/snv/Park/dev/apps/frappe/frappe/model/document.py:1495(composer)
        1    0.000    0.000    0.024    0.024 /home/snv/Park/dev/apps/frappe/frappe/model/document.py:1482(runner)
        1    0.000    0.000    0.022    0.022 /home/snv/Park/dev/apps/india_compliance/india_compliance/gst_india/overrides/transaction.py:1606(onload)
        1    0.000    0.000    0.022    0.022 /home/snv/Park/dev/apps/india_compliance/india_compliance/gst_india/overrides/transaction.py:56(set_gst_breakup)

Activity

sagarvora

sagarvora commented on May 29, 2025

@sagarvora
MemberAuthor

this is not an issue on production sites, since jinja cache is reused there:
https://github.com/frappe/frappe/blob/f17658c4c60e225c63da0ec7b1777af828b8e91e/frappe/utils/jinja.py#L18

sagarvora

sagarvora commented on May 29, 2025

@sagarvora
MemberAuthor

can be closed, athough it'd still be nice to do it on client side

changed the title [-]perf: render gst_breakup in frontend[/-] [+]render gst_breakup in frontend[/+] on May 29, 2025
self-assigned this
on Jun 27, 2025
vorasmit

vorasmit commented on Jul 3, 2025

@vorasmit
Member

backend rendering may still be necessary for before_print. Hence closing this one for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @vorasmit@sagarvora@karm1000

      Issue actions

        render gst_breakup in frontend · Issue #3406 · resilient-tech/india-compliance