如题用户登录的时候异常缓慢,内存8G的服务器,登录超过10秒。发现控制台刷新大量的shiro 菜单信息。。。而且每次登录都会刷新,想问一下有没有什么可以调优的方法?
For example:> "select distinct a.* from sys_menu a,sys_role_menu b where a.id=b.menuId and b.roleId in(select c.roleId from sys_user_role c,sys_role d where c.roleId=d.id and c.userId='a311c77170774b3682b66eaba9757bab' and d.disabled=false) and a.disabled=false and a.isShow=true and a.type='menu' order by a.location ASC,a.path asc"
[DEBUG] 2018-09-15 11:19:45,457 org.nutz.dao.impl.sql.run.NutDaoExecutor.printSQL(NutDaoExecutor.java:388) - SELECT * FROM sys_menu WHERE id IN (?,?)
| 1 | 2 |
|----------------------------------|----------------------------------|
| 003252023f6944b8b303e8a69a21978c | 4c0cdfc7ae164292a86e97951d64dbc5 |
For example:> "SELECT * FROM sys_menu WHERE id IN ('003252023f6944b8b303e8a69a21978c','4c0cdfc7ae164292a86e97951d64dbc5')"
[DEBUG] 2018-09-15 11:19:45,495 org.apache.shiro.realm.AuthenticatingRealm.getAuthenticationInfo(AuthenticatingRealm.java:569) - Looked up AuthenticationInfo [/*cn.wizzer.app.sys.modules.models.Sys_user@3c424cf8*/{"id":"a311c77170774b3682b66eaba9757bab","loginname":"superadmin","password":"IlhnXgS63PwbrjOx5WlVu3Jfhg7hSRnE0ZcsRcFnLRE=","salt":"Z0BjYJIY8kEoxvSBEJ1mKQ==","username":"ӬܶڜmԱ","isOnline":true,"disabled":false,"loginAt":1536892848,"loginIp":"127.0.0.1","loginCount":2875,"customMenu":"003252023f6944b8b303e8a69a21978c,4c0cdfc7ae164292a86e97951d64dbc5","loginTheme":"palette.css","proinputyear":"2018","loginSidebar":false,"loginBoxed":false,"loginScroll":false,"loginPjax":false,"unitid":"268281f0f357429889c659f13e337627","unit":{"id":"268281f0f357429889c659f13e337627","parentId":"0bf8f4718dd4464bb452c1a582ac7d0a","path":"00010003","name":"ɋ˂Ԧ","unitcode":"rsc01","type":"col","location":186,"hasChildren":false,"opBy":"a311c77170774b3682b66eaba9757bab","opAt":1530153918,"delFlag":false},"roles":[{"id":"4qkdtr1dokherq39pg3e3m5tbn","name":"ܹѾ״̬˽ߝࠢ2018_1-7_өߴ","code":"bdbview_3b920187446342f4b3ba038e8dae72c8","disabled":false,"note":"ҭ1-7ѾࠆʺܹѾȩ࠶èѧŪé","opAt":1533203034,"delFlag":false}, {"id":"88ac2a6a312949ddb331d452d06a414f","name":"ϵͳڜmԱ","code":"sysadmin","aliasName":"Sysadmin","disabled":false,"note":"System Admin","opAt":1510138358,"delFlag":false}],"units":[],"menus":[{"id":"673030089e46427086f5b3eefc8b746c","path":"0001","name":"ϵͳ","aliasName":"System","type":"menu","isShow":true,"disabled":false,"permission":"sys","note":"ϵͳ","location":67,"hasChildren":true,"opAt":1510138357,"delFlag":false}, {"id":"094fc1ab5d8c49259acf2574d562ae3d","parentId":"673030089e46427086f5b3eefc8b746c","path":"00010001","name":"ϵͳڜm","aliasName":"Manager","type":"menu","icon":"fa fa-cog","isShow":true,"disabled":false,"permission":"sys.manager","note":"ϵͳڜm","location":68,"hasChildren":true,"opBy":"a311c77170774b3682b66eaba9757bab","opAt":1536288677,"delFlag":false}, {"id":"0831d4a248a443998169d21e9a205417","parentId":"094fc1ab5d8c49259acf2574d562ae3d","path":"000100010001","name":"եλڜm","aliasName":"Unit","type":"menu","href":"/platform/sys/unit","target":"data-pjax","isShow":true,"disabled":false,"permission":"sys.manager.unit","location":341,"hasChildren":false,"opAt":1510138357,"delFlag":false}, {"id":"6e5c0ad1eefa426db962abb31ea2ff92","parentId":"094fc1ab5d8c49259acf2574d562ae3d","path":"000100010002","name":"ԃۧڜm","aliasName":"User","type":"menu","href":"/platform/sys/user","target":"data-pjax","isShow":true,"disabled":false,"permission":"sys.manager.user","location":342,"hasChildren":false,"opAt":1510138357,"delFlag":false}, {"id":"9f4fc2cbc78a4e47b57868fe889ddc59","parentId":"094fc1ab5d8c49259acf2574d562ae3d","path":"000100010003","name":"އɫڜm","aliasName":"Role","type":"menu","href":"/platform/sys/role","target":"data-pjax","isShow":true,"disabled":false,"permission":"sys.manager.role","location":343,"hasChildren":false,"opAt":1510138357,"delFlag":false}, {"id":"faa9f0d2fdc04bf1bc56ab8642d0de76","parentId":"094fc1ab5d8c49259acf2574d562ae3d","path":"000100010004","name":"Ӌեڜm","aliasName":"Menu","type":"menu","href":"/platform/sys/menu","target":"data-pjax","isShow":true,"disabled":false,"permission":"sys.manager.menu","location":344,"hasChildren":false,"opAt":1510138358,"delFlag":false}, {"id":"bae413b8e3b84047a3a14b07b072725f","parentId":"094fc1ab5d8c49259acf2574d562ae3d","path":"000100010005","name":"ϵͳӎ˽","aliasName":"Param","type":"menu","href":"/platform/sys/conf","target":"data-pjax","isShow":true,"disabled":false,"permission":"sys.manager.conf","location":345,"hasChildren":false,"opAt":1510138358,"delFlag":false}, {"id":"b39c537b30094d899b76b5b8a8d9ff4d","parentId":"094fc1ab5d8c49259acf2574d562ae3d","path":"000100010006","name":"ɕ־ڜm","aliasName":"Log","type":"menu","href":"/platform/sys/log","target":"data-pjax","isShow":true,"disabled":false,"permission":"sys.manager.log","location":346,"hasChildren":false,"opAt":1510138358,"delFlag":false}, {"id":"13d3dcc2fc9948e19c6c78c35fe3a633","parentId":"094fc1ab5d8c49259acf2574d562ae3d","path":"000100010008","name":"ؔ֨ӥ·ԉ","aliasName":"Route","type":"menu","href":"/platform/sys/route","target":"data-pjax","isShow":true,"disabled":false,"permission":"sys.manager.route","location":349,"hasChildren":false,"opAt":1510138358,"delFlag":false}, {"id":"4389469ca7474d77bda7dd997f2e309c","parentId":"094fc1ab5d8c49259acf2574d562ae3d","path":"000100010010","name":"˽ߝ֤ؖ","aliasName":"Dict","type":"menu","href":"/platform/sys/dict","target":"data-pjax","isShow":true,"disabled":false,"permission":"sys.manager.dict","location":351,"hasChildren":false,"opAt":1510138358,"delFlag":false}, {"id":"7c8412daf6f34e72a4e75959c26527cf","parentId":"094fc1ab5d8c49259acf2574d562ae3d","path":"000100010012","name":"˽ߝԴڜm","aliasName":"DbManager","type":"menu","href":"/platform/sys/database","target":"data-pjax","isShow":true,"disabled":false,"permission":"platform.sys.database","location":353,"hasChildren":false,"opBy":"a311c77170774b3682b66eaba9757bab","opAt":1511163467,"delFlag":false}, {"id":"7448491544e544b48e5cb3864e6e3c2f","parentId":"094fc1ab5d8c49259acf2574d562ae3d","path":"000100010017","name":"BI·Ƥ׃","type":"menu","href":"/platform/sys/smartbiurlconfig","target":"data-pjax","isShow":true,"disabled":false,"permission":"platform.sys.smartbiurlconfig","location":357,"hasChildren":true,"opBy":"a311c77170774b3682b66eaba9757bab","opAt":1535352794,"delFlag":false}, {"id":"9d65d2471b984223ba86d25f31346699","parentId":"673030089e46427086f5b3eefc8b746c","path":"00010002","name":"ϵͳ˽ߝڜm","aliasName":"FileSystem","type":"menu","target":"data-pjax","icon":"fa fa-cogs","isShow":true,"disabled":false,"permission":"platform.sys.db","location":358,"hasChildren":true,"opBy":"a311c77170774b3682b66eaba9757bab","opAt":1536198630,"delFlag":false}, {"id":"b3fe315ebf0341559f129fe52b19c8a3","parentId":"9d65d2471b984223ba86d25f31346699","path":"000100020005","name":"˽ߝܯڜm","type":"menu","href":"/platform/sys/selectsqls","target":"data-pjax","isShow":true,"disabled":false,"permission":"platform.sys.selectsqls","location":374,"hasChildren":false,"opBy":"a311c77170774b3682b66eaba9757bab","opAt":1527129133,"delFlag":false}, {"id":"4eba2a02ec1349efafc96a0f8a5f7487","path":"0011","name":"ܹѾ״̬˽ߝࠢ","aliasName":"ܹѾ״̬˽ߝࠢ2018","type":"menu","isShow":true,"disabled":false,"permission":"7ff8c17eac3f47009acc886e21a85e21","location":417,"hasChildren":true,"opBy":"a311c77170774b3682b66eaba9757bab","opAt":1531101161,"delFlag":false}, {"id":"fc12387754b04f2285462bd7ba47110d","parentId":"dd6fe19518f04213bd1f7d7c30925b22","path":"001100020001","name":"ҭ1-1ѧУم࠶èʱ֣é","aliasName":"ҭ1-1ѧУم࠶èʱ֣é","type":"menu","href":"/platform/sys/tableview/viewindex/e281e5e93aa44501b2f0f7100dfea783","isShow":true,"disabled":false,"permission":"e281e5e93aa44501b2f0f7100dfea783","location":644,"hasChildren":false,"opBy":"a311c77170774b3682b66eaba9757bab","opAt":1531186458,"delFlag":false}, {"id":"e4f0bf8506cd47738642ae39283e82e7","parentId":"dd6fe19518f04213bd1f7d7c30925b22","path":"001100020002","name":"ҭ1-2Уȸַܰ֘èʱ֣é","aliasName":"ҭ1-2Уȸַܰ֘èʱ֣é","type":"menu","href":"/platform/sys/tableview/viewindex/3d86c1b52d3045a29414cdcd7fe0e1e7","isShow":true,"disabled":false,"permission":"3d86c1b52d3045a29414cdcd7fe0e1e7","location":645,"hasChildren":false,"opBy":"a311c77170774b3682b66eaba9757bab","opAt":1531186464,"delFlag":false},