So I have the following code...

                StringBuilder sb = new StringBuilder(4096);

                while (true) {
                        int i = in.read();
                        if (i == 0)
                            break;
                        else if (i == -1)
                            throw new EOFException();
                        sb.append((char)i);
                }

What I see (with thousands of times run) is that this code takes about
1ms for every 7-10 bytes read...  So reading just 10k takes almost a
SECOND!

Can anyone explain this?

Marc


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to