Comments (7)
@umerkhan-apple Any thoughts on a way to tackle this?
I've been investigating and there doesn't seem to be an easy fix. The preparation and recreation of the OKGroupedBarChartView takes quite a long time and occurs every time cellForRowAtIndexPath is called so the scrolling really lags a lot. I've been testing on an iPod Touch 5g.
A few options I thought of, but not sure what the requirements are for the OKGroupedBarChartView are.
- Separate each of the components of the OKGroupedBarChartView into different UITableViewCells. So one cell for the title label, one cell for each of the bars, and one cell for the legend. This would allow each of these components to be reused as you scroll. It would also simplify the constraints for the cells, which is part of the reason it's taking a while to prepare. The major downside to this approach is it's a bit more complex, and you don't have a reusable OKGroupedBarChartView.
- Add more caching for the OKGroupedBarChartView and reuse the views more, as opposed to recreating them every time. My hesitancy to this approach is that I'm not sure if it's possible to achieve optimal performance since these bar charts are pretty CPU-bound.
from carekit.
Separate each of the components of the OKGroupedBarChartView into different UITableViewCells. So ?one cell for the title label, one cell for each of the bars, and one cell for the legend. This would allow each of these components to be reused as you scroll. It would also simplify the constraints for the cells, which is part of the reason it's taking a while to prepare. The major downside to this approach is it's a bit more complex, and you don't have a reusable OKGroupedBarChartView.
This would be really complex.
Add more caching for the OKGroupedBarChartView and reuse the views more, as opposed to recreating them every time. My hesitancy to this approach is that I'm not sure if it's possible to achieve optimal performance since these bar charts are pretty CPU-bound.
This could be the way to go. Quick workaround would be create a custom OCKBarChart subclass which support chartview caching.
Also can you share with us how many bars on each of chart?
from carekit.
This could be the way to go. Quick workaround would be create a custom OCKBarChart subclass which support chartview caching.
Ah, I'll try this then.
I'm just looking at the test app, which has two charts, 7 bars each.
from carekit.
Caching is a great idea. I tried it out when I found this issue and it worked perfect... but the first instantiation anyway lasts too long. Thanks!
from carekit.
Hey @mikehouse !
Do you need further assistance with this issue?
from carekit.
Hello, @akshay-yadav-apple, this issue is all yours :). Past time I was busy and didn't push changes to fix this. Now I even don't remember what it was about. Thanks.
from carekit.
Closing due to inactivity. Please feel free to reopen if you would like the conversation to continue.
from carekit.
Related Issues (20)
- Warning when uploading App HOT 7
- Occurrence circles HOT 29
- Error when building on latest Xcode and macOS Ventura HOT 1
- Carekit_CareKitStore emitted errors HOT 1
- Compile Errors HOT 1
- How do you save an CareKit OCKOutcomeValue for an array of ResearchKit ORKChoiceQuestionResults HOT 12
- ORKTextChoice + ORKPredicateStepNavigationRule + CareKit + ResearchKit HOT 10
- Bar chart changes every time i close and reopen the application HOT 9
- Problems integrating HealthKit data into an OCKCartesianChartViewController HOT 1
- CareKitStore-CoreData-NSReadOnlyPersistentStoreOption-ErrorMessage HOT 1
- Create monthly charts HOT 3
- Trying to schedule a notification based on the caloriesBurned only if they are less than a certain amount (with query to the health store) HOT 6
- Creating PDF with charts and data from more than one View HOT 1
- Sample app for v3? HOT 1
- CareKit live streaming crashes with multithreaded violations HOT 4
- Updated Content HOT 16
- Watch remote synchronization fails with duplicate Outcome.
- CareKit cannot compile with Xcode 15(beta 2) HOT 1
- Adding a detailed description to the nausea card HOT 3
- Issue with OCKSynchronizedStoreManager HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from carekit.