too many occurrences of record or group in a dictionary

Discussions about CSEntry
manishcspro
Posts: 67
Joined: June 26th, 2017, 2:15 pm

Re: too many occurrences of record or group in a dictionary

Post by manishcspro »

It worked, the message "too many occurrences of record or group in a dictionary" does not appear.
But when I load large data it slows down the cursor movement because it searches previous month's value in external dictionary for creating cumulative values for every occurrence in a case.
Is there any better ways to do this?
aaronw
Posts: 565
Joined: June 9th, 2016, 9:38 am
Location: Washington, DC

Re: too many occurrences of record or group in a dictionary

Post by aaronw »

I'll take a look, but let me know a specific field this affects and the dictionary you're looping through.
manishcspro
Posts: 67
Joined: June 26th, 2017, 2:15 pm

Re: too many occurrences of record or group in a dictionary

Post by manishcspro »

I am looping through items ACHLIST_AT and ACHLIST_CP of CASELIST_DICT to populate ACH_AT and ACH_CP items in main Dictionary ACH_DICT. When cursor reaches on ACH_AT, it searches ACHLIST_AT and when cursor reaches ACH_CP it searches item ACHLIST_CP in ACHLIST dictionary. The cursor works fast if cases are small in numbers but it starts crawling . Please help...
aaronw
Posts: 565
Joined: June 9th, 2016, 9:38 am
Location: Washington, DC

Re: too many occurrences of record or group in a dictionary

Post by aaronw »

I took a look at showat() and showcp(). Both functions include loops that appear to me to be the same. If that's the case, and both calculations are independent, try doing both calculations in a single loop.

Not sure this will have a noticeable impact, but you could move
count(ACH_DICT.ACH)
outside the loop, so it's only calculated once.

If your data is big, you won't be able entirely to avoid a slowdown. Hope that helps.
manishcspro
Posts: 67
Joined: June 26th, 2017, 2:15 pm

Re: too many occurrences of record or group in a dictionary

Post by manishcspro »

Thank you so much for guiding..
Post Reply