Conclusion
So, to conclude about this, inflating a layout with some views with a visibility set to GONE
is bad for performances, especially if the view is a bit complex. If you don’t want to show this view verry often, I would suggest you to create a separate xml file containing your view, inflating this layout when needed, and adding it to your main layout programmatically.
http://magicmicky.github.io/android_development/benchmark-using-traceview/