Aren't you supposed to break the loop when a number is not smaller than the one on it's left? There is no reason to continue all the way to the left most element in every loop
You are very correct, there is no reason to. I guess visually it will also make more sense to break the loop. I initially didn't break it because I wanted it to be slow while I was tweaking the animations. Forgot to add it back. Thanks!
I remember reading that for the previous challenge(the 5kb one). Not sure about this challenge though. It would make sense that it is a rule, because the judges are supposed to remain impartial. I'll definitely link to what I made, or make a video, once I'm allowed to. What I'm trying to do is a little bit heavy on the GPU, so I don't think it will be a prime app. But it looks interesting lol. Are you taking part?
@@FunwithFlutter I started coding a clock with lots of custom painting however I am stuck with the performance issues and writing efficient data structures and algorithms. It seemed too much work and now I am watching videos on yt:) Maybe I will post it the way it is..
@@aytunch I've been playing with Custom Painters a lot recently, some things that might help. 1) Make sure to build small widgets, don't call setState on large widgets. 2) If you're doing animations then use something like AnimatedBuilder (or one of the transition widgets or implicit animations) instead of calling setState. 3) If you are working with unique drawing in a custom painter, make use of Path() (and build the thing you are drawing with a path object) instead of constantly calling canvas.draw (as an example). Instead call canvas.drawPath() You can also store that information and make sure it does not get re rebuilt unnecessarily. 4) Look into Anti Aliasing for your painter - depending on what you paint 5) RepaintBoundary might be of use to you. Check stackoverflow.com/questions/46702376/how-to-ensure-my-custompaint-widget-painting-is-stored-in-the-raster-cache 7) Optimize when your Custom Painter should repaint in the shouldRepaint method 8) Build your app in release mode and see what it looks like, it might be different after you build for release. I made a video on performance profiling if you want to give that a watch. It might help you find the bottleneck, or give some insight.