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

Speedup generating large PDFs #433

Merged
merged 5 commits into from
Jun 9, 2016
Merged

Conversation

wvengen
Copy link
Member

@wvengen wvengen commented Jun 4, 2016

Somehow the PDF documents didn't do proper preloading. This adds it to all but the matrix document (let's do that one too later). Pending:

  • current_orders' multiple_orders_by_articles
  • current_orders' multiple_orders_by_groups
  • fix unit_quantity object (see comment)

Might solve foodcoop-adam#174

@wvengen wvengen added this to the 4.5 milestone Jun 4, 2016
@wvengen wvengen force-pushed the feature/fix-document-preloading branch from a000fc6 to 037e2a1 Compare June 4, 2016 21:23
@@ -36,7 +38,7 @@ def body
rows << [I18n.t('documents.order_by_groups.sum'),
order_article.tolerance > 0 ? "#{order_article.quantity} + #{order_article.tolerance}" : order_article.quantity,
sum[:quantity],
nil] #number_to_currency(sum[:price])]
number_to_currency(sum[:price])]
Copy link
Member Author

Choose a reason for hiding this comment

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

Need to review this change.

@wvengen wvengen force-pushed the feature/fix-document-preloading branch from b36fd0a to 5d6b2f1 Compare June 6, 2016 22:29

group_order_articles.each do |goa|
each_group_order_article_for(ordergroup) do |goa|
has_tolerance = true if goa.order_article.article.unit_quantity > 1
Copy link
Member Author

Choose a reason for hiding this comment

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

needs to be goa.order_article.price.unit_quantity

@wvengen wvengen force-pushed the feature/fix-document-preloading branch from 5d6b2f1 to b9bdd04 Compare June 9, 2016 17:15
@wvengen wvengen changed the title Speedup generating large PDFs (WiP) Speedup generating large PDFs Jun 9, 2016
@wvengen wvengen merged commit 30f2a4c into master Jun 9, 2016
@wvengen wvengen deleted the feature/fix-document-preloading branch June 9, 2016 20:56
@wvengen wvengen removed the s:accepted label Jun 9, 2016
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.

1 participant