1{- benchmarks composing images using the renderChar operation.
2 - This is what Yi uses in Yi.UI.Vty.drawText. Ideally a sequence of renderChar images horizontally
3 - composed should provide no worse performance than a fill render op.
7import Control.Monad ( forM_ )
14 let test_chars = take 500 $ cycle $ [ c | c <- ['a'..'z']]
15 start_time_0 <- getClockTime
16 forM_ test_chars $ \test_char -> do
17 let test_image = test_image_using_renderChar test_char w h
18 out_pic = pic { pImage = test_image }
20 end_time_0 <- getClockTime
21 let start_time_1 = end_time_0
22 forM_ test_chars $ \test_char -> do
23 let test_image = renderFill attr test_char w h
24 out_pic = pic { pImage = test_image }
26 end_time_1 <- getClockTime
28 putStrLn $ timeDiffToString $ diffClockTimes end_time_0 start_time_0
29 putStrLn $ timeDiffToString $ diffClockTimes end_time_1 start_time_1
31test_image_using_renderChar c w h = vertcat $ replicate h $ horzcat $ map (renderChar attr) (replicate w c)
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list