Learn, Share, Build

200
September 21, 2017, at 11:09 PM

I'm working my project and I got some issue. My project layout type is mostly composed of constraintLayout.

Every time I drag widgets from a certain moment, I get a tremendous amount of lag. I tried to do it. But I googled because I could not do it anymore. It's so hard. So, I got this.

Im using this for my optimize file in Android directory. -Xmx4096 -Xmx16g

but it`s not working I think.

My CPU is i7 6700K and My RAM is 32GB.

Why is this super slow to fix some editing? Is ConstraintLayout much heavier than RelativeLayout or LinearLayout?

Answer 1

There are three things you shall try to improve the performance of ConstraintLayout usage:

You can increase virtual machine's heap size for Android Studio: https://developer.android.com/studio/intro/studio-config.html#adjusting_heap_size

You can toggle the design surface to only blueprint mode: https://developer.android.com/studio/write/layout-editor.html#change-appearance

You can check that you're using the latest version of the Constraint Layout library v1.0.2: https://androidstudio.googleblog.com/2017/03/constraintlayout-102-is-now-available.html

READ ALSO
Learn, Share, Build

Learn, Share, Build

I want to make an educational interactive book application which has 500 pagesEach page may have some photos, videos and some questions

169
Learn, Share, Build

Learn, Share, Build

i am developing a Medical dictionary mobile application with ionic and i need a rest api to fetch medical terms to display on the application

153
Learn, Share, Build

Learn, Share, Build

Here's the scenario:

167
Learn, Share, Build

Learn, Share, Build

I know similar question asked before, but they cant solve my problem

183