The application may be doing too much work on its main thread.
See original GitHub issueI used SimpleDraweeView in adapter, but my app runs slowly, and I saw the log below:
I/Choreographer(1378): Skipped 55 frames! The application may be doing too much work on its main thread.
so I comment the code mSimpleDraw.setImageUri
, the app runs fluently. I think the SimpleDraw blocks the main thread when fetching image from network.
Issue Analytics
- State:
- Created 8 years ago
- Reactions:3
- Comments:25 (10 by maintainers)
Top Results From Across the Web
The application may be doing too much work on its main thread
What this means is that your code is taking long to process and frames are being skipped because of it, It maybe because...
Read more >“Skipped 611 frames! The application maybe doing too much ...
The application maybe doing too much work on its main thread.” ... But, these 611 frames could not be rendered as the UI...
Read more >The application may be doing too much work on its main thread
Android : The application may be doing too much work on its main thread [ Beautify Your Computer : https://www.hows.tech/p/recommended.html ] ...
Read more >[Skipped 47 frames! The application may be doing too much ...
[Skipped 47 frames! The application may be doing too much work on its main thread] in simple app #40563.
Read more >The application may be doing too much work on its main thread
Does it happen in release mode? If not then ignore it. If it just happens when you stress test your app then you...
Read more >Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Replacing
with
in my code above fixes the performance problem. If I comment out the
setResizeOptions
line the performance problem comes back. Perhaps something to do with rescaling on the main thread?need help << The application may be doing too much work on its main thread >> And here is my code ViewModel-> class YoutubeViewModel(apiService: ApiService):ViewModel() { val youtubeLiveData=MutableLiveData<Resource<MyYoutubeData>>() private val youtubeRepository=YoutubeRepository(apiService) init { getVideos() } private fun getVideos() { viewModelScope.launch { youtubeLiveData.postValue(Resource.loading(null)) youtubeRepository.getYoutubeData() .catch {e-> youtubeLiveData.postValue(Resource.error(e.message?:“Error”,null)) }.collect { youtubeLiveData.postValue(Resource.success(it)) } } } @JvmName(“getYoutubeLiveData1”) fun getYoutubeLiveData():MutableLiveData<Resource<MyYoutubeData>>{ return youtubeLiveData } } And in MainFragment youtubeViewModel=ViewModelProviders.of(this,ViewModelFactory(ApiClient.apiService))[YoutubeViewModel::class.java]