Closed
Description
Description
I found that the afterFind method of *Model would create a log of goroutines via *errgroup.Group.Go(...) even if the element of the Value of *Model does not implement the AfterFindable interface, which might cause a lot of unneeded CPU cost. To avoid this, I think we could move the AfterFindable interface checking out of the Go function. If this's really a problem, I think I could submit a PR to fix it.
Lines 32 to 43 in 17f09c0
Additional Information
No response
Activity
github-actions commentedon Dec 27, 2022
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment. Otherwise, this will be closed in 7 days.
github-actions commentedon Jan 3, 2023
This issue was closed because it has been stalled for 30+7 days with no activity.
limit invoking go routines when only the model is AfterFindable (fixes …
AfterFindable
#805sio4 commentedon Jan 13, 2023
Hi @seedeed, Thank you for reporting this issue. I agree with you, the block could spend unnecessary resources.
The block was recently touched with a new thing, and I opened a PR for your issue after that. The PR is #805, and the specific commit is 89774fa. Please take a look at the PR and/or the commit and give me feedback if the direction is the same as your idea, or please let me know your idea if you have another good way.
Thanks in advance!
4 remaining items