Extreme performance in download for status notification bar
===

{

        @Override
        protected void onProgressUpdate(Integer... values) {
            if (values.length>0) {
                //Log.d("Download Activity", "progressUpdate:"+values[0]);
                if (values[0] < 0) {
                    this.cancel(true);
                    showNetworkErrorDialog();
                } else {
                    //size += values[0];
                    //Log.d("Download Activity", "downloaded size:"+size);
                    //downloadedGoodListSize += values[0];
                    //downloadProgressBar.incrementProgressBy(values[0]);
                    setCurrentProgress(values[0]);
                    downloadProgressBar.setProgress(values[0]);
                    double currentProg = downloadProgressBar.getProgress()*1.0/downloadProgressBar.getMax()*100;
                    //progressTextView.setText( decimalFormat.format(downloadedGoodListSize*1.0/downloadProgressBar.getMax()*100.0)+"%");
                    progressTextView.setText(decimalFormat.format(downloadProgressBar.getProgress()*1.0/downloadProgressBar.getMax()*100)+"%");
            
                    notification.contentView.setProgressBar(R.id.pb, 100, (int)currentProg, false);
                   nm.notify(notificationID, notification);
                
                }
            }
        }



In the program , I initialise everything and extend AsyncTask to implement file download
When my program in execution, it causes slow response for dragging down for the notification bar . Should I add a new thread or synchronise these two update commands and functions? 











}