-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Slow performance with fixed header and pinned column #3719
Comments
I think a Plummer would help here. Sent from my iPhone
|
@PaulL1 - Plummer? |
Stupid iPhone. Plunker. |
+1 For getting a plumber to help you out on this one! |
I'm experiencing (what I think is) the same issue. GIF illustrating the problem below. Touch scrolling works beautifully in Chrome & Mobile Safari -- when I deploy to iOS using Cordova, funny things happen. http://gfycat.com/KindDrearyBuckeyebutterfly I'll try to get my code into a Plunkr ASAP. |
Thank you for saving me @mattrothenberg. This was exactly the problem. I haven't solved it using ng-grid but creating 3 different ionic-scrolls elements (1 header, 1 column1, 1 content). when using on-scroll, i've read the X and Y position then used .css(transform...) to move the other two also. That way, I've got the fastest grid, it took me about a day to finalize it, but its finally done. |
Haha, that's exactly what I was doing prior to using ng-grid! If only I didn't have to support sorting of columns... |
I am using the sorting also. Where's the problem Matt? Just use ng-click="setSort('byID')" for example, then in do your things, and in ng-repeat, just use sortby 👍 |
I'd love to see your implementation in a Plunker or Codepen, @lordgreg! In the meantime, I've used the following SCSS Mixin on the
|
I will make a pseudocode tomorrow for you to see :) But, take notice, CSS styling took a while. Also, for rows and cols, I've used ionicframeworks rows and cols grid system. Will post more tomorrow. Unitl then, good luck :ž |
Was this issue solved? |
Hi. I've never bothered to check if the development of ui-grid got any further. Sadly, I didn't even create a Plunker as @mattrothenberg asked. I'll try to show you what we've did: template
To explain the code above a-bit- We have splitted the view in 3 different parts- header, content and first column (which should be static). For each of those, we've used ion-scroll element. each controller
To better understand the issue we were having: When scrolling one ion-scroll and calling $ionicScroll with So for example:
Using that kind of transforming, we're actually updating only CSS of a specific element of the DOM. With this implementation, we've got the best results regarding performance. The implementation was without a lag or hiccups. Keep in mind header columns equals content columns. After we were done with the implementation, it was the time to make everything nice using SCSS
I hope the code snippets are at least a bit helpful for you to better understand what you have to do. tl;dr
|
@lordgreg I've just come across this issue thread and your code snippets. In one of our apps we are having a "vote" table which looks like this: https://dl.dropboxusercontent.com/u/22622235/vote_table.png Currently, header row and most left column are not fixed, users can scroll in all directions and zoom in on mobile devices. We are using an ionic ion-scroll element like this:
Now we want to make the header row and most left column fixed when a user scrolls and are thinking of trying out ui-grid for that. Your solution using 3 ion-scroll elements however might be more appropriate though. Therefore I'd like to ask if you are still using this solution and if it has evolved in some way since end of 2015. Thanks very much for your reply and kind regards, |
The planned solution still works and it is still the fastest one, since you are always updating only If customer decides to update the whole Project to Ionic2, then, we'll have to update the whole project, however the utilisation of what you see in the code above will stay the same. I wish you good luck with the implementation, it will work as it should 👍 |
@lordgreg Lovely, we'll try it out! Thanks very much for your super-fast response! |
:) You're welcome and thank you. |
Hi,
I'm using latest version of ng-grid: 3.0.0-RC21 and really small dataset (JSON length of approximately 100 rows) with 20 columns, but did this for showing table (not all fields of array visible):
HTML looks like this:
Now, when I run this example on iOS simulator or iPad4, the scrolling seems very very unresponsive. When scrolling, the pinned column just doesn't refresh so fast as it should. The fields stay where they are until scrolling slows down a bit, then the pinned column also refreshes the rows to be on the position of non-fixed fields. The excessRows part above is there because we need to have snappy and fast performing ui. At the moment, it looks very bad and totally laggy, not even close to what the example with pinned columns show. In Chrome it looks great, but, as I said, iOS simulator or iPad, it is just laggy as hell.
Why is that so and could I get snappier scrolling with some code optimization?
The text was updated successfully, but these errors were encountered: