title: Android Performance Optimization Problem (Layout with JustifiedTextViews and CodeViews)
body: <p>My problem is that <strong>my application is quite slow</strong> when I open an Activity full of JustifiedTextView and CodeView.</p>
  
  <pre><code>implementation 'com.github.softwee:codeview-android:1.1.2'
  implementation 'com.uncopt:android.justified:1.0'
  </code></pre>
  
  <p>I use these libraries in order to achieve justified texts and to be able to use syntax highlighter.</p>
  
  <p><strong>Question A</strong>: is it possible that these 3rd party libraries make my application slow? Sometimes 100-150 frames are skipped!</p>
  
  <p><strong>Question B</strong>: is it a good approach to do these things on my own? So implement text justification etc. on my own?</p>
  
  <p><strong>Question C</strong>: is it better to store strings in database (<em>SQLite</em>) rather than using <em>strings.xml</em>?</p>
  
  <p>This is an example of an activity's exact source code:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
  android:id="@+id/scroll"
  android:layout_width="match_parent"
  android:layout_height="wrap_content"&gt;
  
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:background="@android:color/white"
      android:orientation="vertical"
      android:padding="20dp"
      tools:context=".SortingMainActivity"&gt;
  
      &lt;TextView
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:textColor="#858a9f"
          android:paddingTop="20dp"
          android:paddingBottom="20dp"
          android:textSize="20dp"
          android:text="What is Bogo Sort?"
          android:textStyle="bold"
          app:fontFamily="@font/roboto_slab" /&gt;
  
      &lt;com.uncopt.android.widget.text.justify.JustifiedTextView
          android:id="@+id/bogoSortFirstParagraph"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:textColor="#858a9f"
          android:textSize="18dp"
          app:fontFamily="@font/roboto_slab"
          android:paddingBottom="10dp"/&gt;
  
      &lt;com.uncopt.android.widget.text.justify.JustifiedTextView
          android:id="@+id/bogoDeterministic"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:paddingBottom="10dp"
          android:textColor="#858a9f"
          android:textSize="18dp"
          app:fontFamily="@font/roboto_slab" /&gt;
  
      &lt;com.uncopt.android.widget.text.justify.JustifiedTextView
          android:id="@+id/bogoRandom"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:paddingBottom="10dp"
          android:textColor="#858a9f"
          android:textSize="18dp"
          app:fontFamily="@font/roboto_slab" /&gt;
  
      &lt;com.uncopt.android.widget.text.justify.JustifiedTextView
          android:id="@+id/bogoEssence"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:paddingBottom="10dp"
          android:textColor="#858a9f"
          android:textSize="18dp"
          app:fontFamily="@font/roboto_slab" /&gt;
  
      &lt;TextView
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:textColor="#858a9f"
          android:paddingTop="10dp"
          android:paddingBottom="20dp"
          android:textSize="20dp"
          android:text="Implementation"
          android:textStyle="bold"
          app:fontFamily="@font/roboto_slab" /&gt;
  
      &lt;com.uncopt.android.widget.text.justify.JustifiedTextView
          android:id="@+id/bogoFisherYates"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:paddingBottom="10dp"
          android:textColor="#858a9f"
          android:textSize="18dp"
          app:fontFamily="@font/roboto_slab" /&gt;
  
      &lt;io.github.kbiakov.codeview.CodeView
          android:id="@+id/shuffleCodeView"
          android:paddingBottom="10dp"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"/&gt;
  
      &lt;com.uncopt.android.widget.text.justify.JustifiedTextView
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:paddingBottom="10dp"
          android:textColor="#858a9f"
          android:textSize="18dp"
          android:text="@string/bogoTheory1"
          app:fontFamily="@font/roboto_slab" /&gt;
  
      &lt;io.github.kbiakov.codeview.CodeView
          android:id="@+id/swapCodeView"
          android:paddingBottom="10dp"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"/&gt;
  
      &lt;com.uncopt.android.widget.text.justify.JustifiedTextView
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:paddingBottom="10dp"
          android:textColor="#858a9f"
          android:textSize="18dp"
          android:text="@string/bogoTheory2"
          app:fontFamily="@font/roboto_slab" /&gt;
  
      &lt;io.github.kbiakov.codeview.CodeView
          android:id="@+id/isSortedCodeView"
          android:layout_width="match_parent"
          android:paddingBottom="10dp"
          android:layout_height="wrap_content"/&gt;
  
      &lt;com.uncopt.android.widget.text.justify.JustifiedTextView
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:paddingBottom="10dp"
          android:textColor="#858a9f"
          android:textSize="18dp"
          android:text="@string/bogoTheory3"
          app:fontFamily="@font/roboto_slab" /&gt;
  
      &lt;io.github.kbiakov.codeview.CodeView
          android:id="@+id/sortCodeView"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"/&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p></p>