Problem analysis: Similar to ToTree()/ToTreeAsync(), the internal use of unoptimized generic reflection recursion leads to time-consuming problems
Solution: Use a dictionary and make full use of the ability of hashing. According to the test, 10000 pieces of data are transferred into the root node, and the result of sub tree tiling is controlled at 15ms or less. With its own database query time, the overall result is within 1s
ToChildList()/ToChildListAsync() Performance Improve
这是我在论坛提的issue:https://www.donet5.com/Ask/9/16746
问题分析:和ToTree()/ToTreeAsync()类似,内部使用未经优化的泛型反射递归,导致了耗时问题 解决方案:使用词典,充分运用哈希的能力。经测试,10000条数据以根节点传入,得到子树平铺结果控制在15ms上下,加上本身的查库时间,总体也在1s以内
Problem analysis: Similar to ToTree()/ToTreeAsync(), the internal use of unoptimized generic reflection recursion leads to time-consuming problems
Solution: Use a dictionary and make full use of the ability of hashing. According to the test, 10000 pieces of data are transferred into the root node, and the result of sub tree tiling is controlled at 15ms or less. With its own database query time, the overall result is within 1s