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
This commit is contained in:
parent
69482b3ceb
commit
3c1d7e9aca
|
@ -387,7 +387,16 @@ has been moved out).
|
||||||
(let loop ([crops crops])
|
(let loop ([crops crops])
|
||||||
(cond
|
(cond
|
||||||
[(null? crops) shape]
|
[(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
|
(cond
|
||||||
[(translate? shape)
|
[(translate? shape)
|
||||||
(loop (translate-shape shape)
|
(loop (translate-shape shape)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user