Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

change large string creation in test otherwise v8 slow

  • Loading branch information...
commit 8e7706edafefc9f3a4ec9a14206887b15604cc85 1 parent 4b26a9b
Antoine Girbal authored October 14, 2011
6  jstests/big_object1.js
@@ -4,11 +4,11 @@ t.drop();
4 4
 
5 5
 if ( db.adminCommand( "buildinfo" ).bits == 64 ){
6 6
     
7  
-    s = ""
  7
+    var large = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
  8
+    var s = large;
8 9
     while ( s.length < 850 * 1024 ){
9  
-        s += "x";
  10
+        s += large;
10 11
     }
11  
-    
12 12
     x = 0;
13 13
     while ( true ){
14 14
         n = { _id : x , a : [] }
6  jstests/mr_bigobject.js
@@ -2,9 +2,11 @@
2 2
 t = db.mr_bigobject
3 3
 t.drop()
4 4
 
5  
-s = "";
  5
+// v8 requires large start string, otherwise UTF16
  6
+var large = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
  7
+var s = large;
6 8
 while ( s.length < ( 6 * 1024 * 1024 ) ){
7  
-    s += "asdasdasd";
  9
+    s += large;
8 10
 }
9 11
 
10 12
 for ( i=0; i<5; i++ )

0 notes on commit 8e7706e

Please sign in to comment.
Something went wrong with that request. Please try again.