simple fix to deal with performance problem noticed by jpr (this is not a complete fix, but should work in the common case of lots of repeated place-image calls)
svn: r17783 original commit: 3c1d7e9acad060f9dab7b62f1a9c46d39355a31d
This commit is contained in:
parent
241f636d72
commit
87f4078b25
|
@ -387,7 +387,16 @@ has been moved out).
|
|||
(let loop ([crops crops])
|
||||
(cond
|
||||
[(null? crops) shape]
|
||||
[else (make-crop (car crops) (loop (cdr crops)))])))
|
||||
[(null? (cdr crops))
|
||||
(make-crop (car crops) shape)]
|
||||
[else
|
||||
(let ([fst (car crops)]
|
||||
[snd (cadr crops)])
|
||||
(cond
|
||||
[(equal? fst snd)
|
||||
(loop (cdr crops))]
|
||||
[else
|
||||
(make-crop (car crops) (loop (cdr crops)))]))])))
|
||||
(cond
|
||||
[(translate? shape)
|
||||
(loop (translate-shape shape)
|
||||
|
|
Loading…
Reference in New Issue
Block a user