Skip to content

Commit f894d80

Browse files
committed
Merge pull request #226 from vonloxley/Perf1
Perf1
2 parents 834914c + 21151b5 commit f894d80

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/com/activeandroid/DatabaseHelper.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,10 @@ public void copyAttachedDatabase(Context context, String databaseName) {
105105
final InputStream inputStream = context.getAssets().open(databaseName);
106106
final OutputStream output = new FileOutputStream(dbPath);
107107

108-
byte[] buffer = new byte[1024];
108+
byte[] buffer = new byte[8192];
109109
int length;
110110

111-
while ((length = inputStream.read(buffer)) > 0) {
111+
while ((length = inputStream.read(buffer, 0, 8192)) > 0) {
112112
output.write(buffer, 0, length);
113113
}
114114

0 commit comments

Comments
 (0)