setText("test") is freezing UI
<p>I dont understand</p>

<p>I have a background thread which gets cpu load and then set it to text view</p>

<p>Problem is when setText() method is executed UI freezes for a second, i can feel it when scrolling through other elements of ui</p>

<pre><code>Runnable runnable = new Runnable() {
        @Override
        public void run() {
            while(thread) {
                try {
                    RandomAccessFile reader = new RandomAccessFile("/proc/stat", "r");
                    String load = reader.readLine();

                    String[] toks = load.split(" ");

                    long idle1 = Long.parseLong(toks[5]);
                    long cpu1 = Long.parseLong(toks[2]) + Long.parseLong(toks[3]) + Long.parseLong(toks[4])
                        + Long.parseLong(toks[6]) + Long.parseLong(toks[7]) + Long.parseLong(toks[8]);

                    try {
                        Thread.sleep(360);
                    } catch (Exception e) {
                        }

                    reader.seek(0);
                    load = reader.readLine();
                    reader.close();

                    toks = load.split(" ");

                    long idle2 = Long.parseLong(toks[5]);
                    long cpu2 = Long.parseLong(toks[2]) + Long.parseLong(toks[3]) + Long.parseLong(toks[4])
                        + Long.parseLong(toks[6]) + Long.parseLong(toks[7]) + Long.parseLong(toks[8]);

                    fLoad =  (float)(cpu2 - cpu1) / ((cpu2 + idle2) - (cpu1 + idle1));

                } catch (IOException ex) {
                        }
                final int load =(int) (fLoad*100);
                try {
                    Thread.sleep(1000);
                } catch (InterruptedException e) {
                }
                mHandler.post(new Runnable() {
                        @Override
                        public void run() {

                            setCpuLoad(load);
                        }
                    });
            }
        }
    };
    new Thread(runnable).start();
}
</code></pre>

<p>.</p>

<pre><code> private final void setCpuLoad(int load){
    cpuLoad.setProgress(load);
    cpuLoadTxt.setText(load+"%");
}
</code></pre>

<p>I tried a lot of stuff and eventually figure out that problem is in setText() because when i comment it UI is smooth</p>
