Flutter high images RAM consumption - performance

I'm working on an app (mainly for iOS) that contains ListView.builder with lots of pictures (about 64 pictures, 7.7 Mb size in total on disk) and I have a huge performance problem on devices with 1 Gb RAM and lower. I tried to decrease imageCache _maximumSizeBytes to 30 Mb and now the app works better in terms of smoothness but it's bad workaround because now pictures are uploaded from the cache and it leads to freezes in pictures appearing in the list.
Any suggestions/ideas?
[✓] Flutter (Channel master, v1.10.16-pre.88, on Mac OS X 10.14.6 18G103, locale en-RU)
• Flutter version 1.10.16-pre.88 at /Users/alectogeek/Documents/Programs/flutter
• Framework revision ff95b14ad8 (30 hours ago), 2019-11-07 23:14:17 -0500
• Engine revision 7ed9c9fc58
• Dart version 2.7.0

Related

Android emulator start makes Mac unresponsive

I'm trying to set up an android emulator on a brand new MacBook Pro (2019 late i7 6-core (Intel(R) Core(TM) i7-9750H CPU # 2.60GHz), Radeon 555x).
When I set up an emulator always happens the same: Emulator starts to boot and mac become unresponsive (trackpad becomes a brick. Then the Mac system restarts with no error report just with "BAD MAGIC! (flag set in iBoot panic header), no macOS panic log available" message.
What I tried: Reinstall HAXM, different versions of HAXM, different versions of the android studio (inc. 4.0.1 canary), different versions of AVD, all above using homebrew, using software graphic, more RAM, and clean iOS reinstall too (with full clear). Genymotion also failed.
On Windows, after a clean install (boot camp) the same happens. ARM-based emulators can start, but they are extremely slow.
I've reset SMC, NVRAM and diagnostics say everything is fine...
All suggestion is appreciated.
Updates:
Current MacOS version: 10.15.3 (19D76)
I also tried backing up the wrong mac and restore on another MBP, in this case, it worked on the other MBP.
I tried to remove these folders one by one:
• ~/Library/InputMethods
• ~/Library/InputManagers
• ~/Library/Caches
• ~/Library/Containers
• ~/Library/Application Support
• ~/Library/Preferences
• /Library/LaunchAgents
• /Library/LaunchDaemons
• /Library/StartupItems
• /Library/InputMethods
• /Library/InputManagers
Tried in safe mode,
with other emulators (genymotion, bluestacks),
under a virtual machine (VMware and VirtualBox with ubuntu) when
the emulator starts the same happens.
tired under Catalina
Contacted intel, they said: "Apple has explicitly requested all support inquiries or issues to be addressed directly to them"
Contacted Apple (million times... for 6 months) they said: "Since the problem is caused by a third party application, there is limited protection or support to provide." After using capture data, their engineers have found out that the issue may be caused by "com.intel.haxm" (like I said, surprise!)
Have you checked the crash logs (/Library/Logs/DiagnosticReports/*.panic)? If the problem is due to the graphics driver, try using a utility to force your Macbook to use low-powered graphics instead of the AMD card. I personally use gSwitch.
The issue was clearly CPU related. We've found some similar cases with the same CPU, so the resolution was replacing my MBP.
check your source code, it might be some background processing and/or infinite loops.

Genymotion Android emulator laggy on Macbook

I've been using genymotion for android react-native development but the emulator is so mind numbingly slow compared to the xcode ios emulator.
mbp specs
2.5ghz i7
16gb ram
intel iris plus 640
500gb ssd
genymotion specs
genymotion 3.0.0
google pixel emulator
processors 4
memory size 4096
virtual box 5.2.22
I had virtual box 6.x before but found a stack thread suggesting downgrading to the recommended version but it didn't fix anything.
The emulator works fine and boots relatively quick - all the animations however are very laggy and make it a pain to use
Looking for any recommendations, thanks
edit: I've tried reducing processors to 2 as virtual box was attempting to use 4 (default) but I have a dual core laptop, performance increased slightly - but still far off from the ios emulator
Have you tried using an older version of Android? I heard reports of users finding the latest versions (especially Android 9.0) to be slow on macOS. This should be fixed in Genymotion Desktop 3.1.0.

Does OS X support 3x scaling yet?

In Xcode 6.1 I'm seeing a "3x" and "All" resolutions available for my Mac OS X target. I wonder if the "3x" option is used for Mac apps? If it does, which configurations that calls for the 3x artworks?
Does the new 5K iMac makes use of those 3x artwork resolutions? Or some Mac pro configurations?
If those 3x artworks are not present, does it render the PDF version instead of upscaling the 2x ones?
The only reason 3x is available is because in the Devices attribute, you've chosen Universal – if you choose Device Specific and check only Mac, you'll see only 1x and 2x.
The 5K iMac just uses 2560x1440 #2x (hence 5120x2800 pixels), not 3x in any case. iPhone 6 Plus is the only device to make use of 3x images, as far as I know.
Answer accurate at time of writing! (17/04/15)

iOS 7 memory issues

I was recently trying to make my iOS 6 compatible app work with iOS 7 (noted still in beta). So i had my boss install iOS 7 on his iPhone 4S. We noticed that camera picker was slow and not responsive, and when we take a picture everything freezes. When i run the profile with memory allocations i notice that we have a really high memory usage : 160 MB. and btw we received a loot of memory warnings. So i tried running on the iPhone that still has ios6 and the maximum memory spike was 16 MB. Has anyone encountered this problem? Thank you
I do observe different Memory numbers on iOS 6 & iOS 7.
I have an app that makes use of openGL (a 3D viewer), and of AVFoundation (my own camera implementation, with AVCaptureDevice...)
I ran the app on iPhone 4S with iOS 6, and on iPhone 4 with iOS 7, my observations so far :
Allocations, Dirty & resident VM sizes reported by Instruments seem higher on iOS 7 than iOS 6 (50% to 100% higher)
BUT
I get much less Memory warning with iOS 7 (although I probably would have to repeat these tests to get more reliable results)
In iOS 7, apple introduce more restriction on memory allocation for single instance. If the single thread uses more memory it should crash.
This is not only related to native application but also related to hybrid app.
Ex: Google Maps getting crashed only in iOS 7, if it uses more memory. You can able to get more information in the below link.
Crashes in iOS7

Mac OS X Lion 10.7.2 Xcode 4.2 memory issues

I've got MacBook Pro 2011, 15" i7 2GHz 8GB Ram 1333 MHz OS X Lion 10.7.2 all updates installed released to this date.
I have done everything what I can to minimize RAM consumpsion and the only problem I've got at this point is when I run Xcode. I had 4gigs of RAM, than bought 8 gigs and always 've got 10-30 MB of free memory after 3-5 minutes of Xcode running and PAGE INS are 300MB - 700MB. I tried to switch to 32-bit running mode but no change. Can anybody help me please?
Yes. One way is to disable indexing, another is to reduce the number of build processes. These are hidden preferences in Xcode 4 which I have detailed here:
Hidden Features of Xcode 4
I've also made a pretty extensive write up for improving and working with Xcode's resource issues:
Why are xcodebuild and Xcode 4.2 so slow?

Resources