dev: reg: areg: Speed up reg and areg by only aligning to first 1000 items.
This commit is contained in:
parent
4a80551406
commit
cbc985d411
@ -130,8 +130,8 @@ accountTransactionsReportAsText copts reportq thisacctq items = TB.toLazyText $
|
|||||||
title <> TB.singleton '\n' <> lines
|
title <> TB.singleton '\n' <> lines
|
||||||
where
|
where
|
||||||
lines = foldMap (accountTransactionsReportItemAsText copts reportq thisacctq amtwidth balwidth) items
|
lines = foldMap (accountTransactionsReportItemAsText copts reportq thisacctq amtwidth balwidth) items
|
||||||
amtwidth = maximumStrict $ 12 : widths (map itemamt items)
|
amtwidth = maximumStrict $ 12 : widths (map itemamt $ take 1000 items)
|
||||||
balwidth = maximumStrict $ 12 : widths (map itembal items)
|
balwidth = maximumStrict $ 12 : widths (map itembal $ take 1000 items)
|
||||||
widths = map wbWidth . concatMap (showMixedAmountLinesB oneLine)
|
widths = map wbWidth . concatMap (showMixedAmountLinesB oneLine)
|
||||||
itemamt (_,_,_,_,a,_) = a
|
itemamt (_,_,_,_,a,_) = a
|
||||||
itembal (_,_,_,_,_,a) = a
|
itembal (_,_,_,_,_,a) = a
|
||||||
|
|||||||
@ -96,8 +96,8 @@ postingsReportAsText :: CliOpts -> PostingsReport -> TL.Text
|
|||||||
postingsReportAsText opts items = TB.toLazyText lines
|
postingsReportAsText opts items = TB.toLazyText lines
|
||||||
where
|
where
|
||||||
lines = foldMap (postingsReportItemAsText opts amtwidth balwidth) items
|
lines = foldMap (postingsReportItemAsText opts amtwidth balwidth) items
|
||||||
amtwidth = maximumStrict $ 12 : widths (map itemamt items)
|
amtwidth = maximumStrict $ 12 : widths (map itemamt $ take 1000 items)
|
||||||
balwidth = maximumStrict $ 12 : widths (map itembal items)
|
balwidth = maximumStrict $ 12 : widths (map itembal $ take 1000 items)
|
||||||
widths = map wbWidth . concatMap (showMixedAmountLinesB oneLine)
|
widths = map wbWidth . concatMap (showMixedAmountLinesB oneLine)
|
||||||
itemamt (_,_,_,Posting{pamount=a},_) = a
|
itemamt (_,_,_,Posting{pamount=a},_) = a
|
||||||
itembal (_,_,_,_,a) = a
|
itembal (_,_,_,_,a) = a
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user