jqGrid multiselect is very slow with large local data and jQueryUI 1.8, jQueryUI 1.7 is fine

后端 未结 2 1841
心在旅途
心在旅途 2021-01-14 15:16

I am using jqGrid in an ASP.NET page and injecting the datainto a script block on the page and then loading from there. For this one use case it is necessary that we have a

2条回答
  •  耶瑟儿~
    2021-01-14 15:54

    These are general observations I've made with regard to JQGrid and IE >= 7. I've seen you example pages and many of these won't affect your specific situation.

    • IE doesn't handle large javascript well - keep your javascript small and it will load jqgrid faster.
    • Don't pass html elements when loading the grid, building them after the load improves initial load speed.
    • If you can - Use paging, this will improve load speed and interactive states.
    • You can load you whole grid data at once and still include paging - no need to call the server multiple times. This will slow initial load, but improve paging speeds.
    • If you can, add this : to the head of your html. It will run IE 8 in IE 7 mode, which I find works faster with JQGrid.
    • Event propagation in jquery, so adding an event listener to a parent with children will also activate that event on the children. When interacting with other DOM object, keep this in mind. Jquery .hover prevents propagation.
    • This is an important one - :hover in IE is slow and really really slow in IE 8!
    • Jquery theme roller - The Interaction states section uses :hover on a tags and when hovering inserts a background image, which when removed improves performance a lot I find. So for exmaple background: #5d5f69 url(/content/images/ui-bg_flat_75_5d5f69_40x100.png) 50% 50% repeat-x; should be background: #5d5f69; This improves interactive states.

    Let me know you findings - I'm still looking for ways to improve my grid speed too.

提交回复
热议问题