<s> '''<STR_LIT:U+0020>''' <EOL> __docformat__ = '<STR_LIT>' <EOL> __version__ = '<STR_LIT>' <EOL> import time <EOL> from pyglet . ext . layout import * <EOL> from pyglet . window import * <EOL> window = Window ( visible = False ) <EOL> def print_time ( start , msg ) : <EOL> dt = time . time ( ) - start <EOL> print '<STR_LIT>' % ( dt , msg ) <EOL> def profile ( xhtml , widths = [ <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT:200> , <NUM_LIT:100> ] , runs = <NUM_LIT:3> ) : <EOL> for i in range ( runs ) : <EOL> start = time . time ( ) <EOL> layout = Layout ( ) <EOL> layout . set_xhtml ( xhtml ) <EOL> print_time ( start , '<STR_LIT>' ) <EOL> for width in widths : <EOL> for i in range ( runs ) : <EOL> start = time . time ( ) <EOL> layout . viewport_width = width <EOL> layout . draw ( ) <EOL> print_time ( start , '<STR_LIT>' % width ) <EOL> for i in range ( runs ) : <EOL> start = time . time ( ) <EOL> layout . draw ( ) <EOL> print_time ( start , '<STR_LIT>' % width ) <EOL> xhtml = '''<STR_LIT>''' <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> profile ( xhtml ) </s>
