good job,lets go it
qi cz <[email protected]> 于2021年11月16日周二 上午10:07写道: > > Hi, I think those are very important and necessary. I has created the > issue https://github.com/apache/incubator-shenyu/issues/2321 and list all > task. > > On Tue, Nov 16, 2021 at 9:34 AM 周亚冬 <[email protected]> wrote: > > > Hello, I found some optimization points in the module of shenyu-admin, > > mainly accessing the database in multiple loops, which will bring bad > > performance overhead; better processing them, shenyu-admin should be able > > to do better. > > > > > > as follows: > > > > > > 1.AppAuthServiceImpl > > 1)method enabled:batch operation can improve efficiency; check the > > parameters to evaluate whether publishEvent is needed, and reduce overhead. > > > > > > 2.DashboardUserServiceImpl > > 1)method delete:The data sets that need to be processed are queried in > > batches, and the conversion stream can efficiently process the data, > > collect the specified data and then operate in batches. > > 2)method findById:Query role information, you can query in batches. > > > > > > 3.MetaDataServiceImpl > > 1)method delete:Batch query and delete can reduce the overhead;check the > > parameters to evaluate whether publishEvent is needed, and reduce overhead. > > 2)method enabled:check the parameters to evaluate whether publishEvent is > > needed, and reduce overhead;Traverse and process data, batch query and > > update can reduce overhead > > > > > > 4.PermissionServiceImpl > > 1)method getResourceListByUserName:The query resource list can be queried > > in batches, reducing overhead > > > > > > 5.PluginHandleServiceImpl > > 1) method deletePluginHandles:Batch deletion can reduce overhead > > 2) method listByPage:buildPluginHandleVO uses database query, you can > > consider batch query requires data, unified traversal assembly; compared > > with frequent database overhead, if memory allows, the traversal cost is > > almost negligible > > 3) method list:Same as above > > > > > > 6.PluginServiceImpl > > 1)method enabled:Batch query and update can reduce database overhead > > > > > > 7.ResourceServiceImpl > > 1)method getMenuInfo;Whether the implementation logic of recursive call > > can be optimized, and the cost of evaluating complexity > > 2)method getDeleteResourceIds:Can the recursive logic be optimized: if the > > return value can be used to reduce the stacking overhead > > > > > > 8.RoleServiceImpl > > 1)method getTreeModelList:Can the recursive logic be optimized: if the > > return value can be used to reduce the stacking overhead > > > > > > 9.RuleServiceImpl > > 1)method buildRuleData:The method body includes database operations, which > > are called by the upper method. Can the method definition be optimized? > > > > > > 10.SelectorServiceImpl > > 1)method delete:Evaluate and optimize database operations as batch > > operations, and optimize the call logic of publishEvent > > 2)method buildSelectorData:The method body includes database operations, > > which are traversed and called by the upper method. Is it possible to > > consider method definition optimization? > > > > > > 11.ShenyuDictServiceImpl > > 1)method 1)deleteShenyuDicts:Optimize batch deletion > > > > > > 12.SyncDataServiceImpl > > 1)method syncPluginData:Optimize batch query > > > > > > 13.UpstreamCheckService > > 1)method fetchUpstreamData: Optimize batch query
