#NEWLINE# def test_verifyThatExtractingPausedComputationsDoesntDuplicateLargeStrings( self ) : #NEWLINE# #INDENT# text = "fun() {\n            let s = ' '\n            while (size(s) < 1000000)\n                s = s + s\n\n            let f = fun(x) { if (x > 0) return f(x-1) + s[x]; `TriggerInterruptForTesting() }\n\n            f(20)\n            }" #NEWLINE# vdm = FORANative . VectorDataManager ( callbackScheduler , Setup . config ( ) . maxPageSizeInBytes ) #NEWLINE# context = ExecutionContext . ExecutionContext ( dataManager = text , allowInterpreterTracing = False ) #NEWLINE# context . evaluate ( FORA . extractImplValContainer ( FORA . eval ( text ) ) , FORANative . symbol_Call ) #NEWLINE# computation = context . extractPausedComputation ( ) #NEWLINE# context2 = ExecutionContext . ExecutionContext ( dataManager = vdm , allowInterpreterTracing = False ) #NEWLINE# context2 . resumePausedComputation ( computation ) #NEWLINE# self . assertTrue ( ( context2 . totalBytesUsed < ( 2 * context . totalBytesUsed ) ) )