David Bienvenu wrote:

> Seth Spitzer wrote:
> 
>> 
>> If you were to delete 20 messages from a folder with 1,000 we'd 
>> unassert  on every message we delete.  This would cause us to reflow 
>> and scroll 20  times, which is very expensive.
>> 
>> My fix is to call beginBatch() when we call delete with more than <n> 
>> messages, and then when the delete is complete, call endBatch().
>> 
>> (<n> is not determined yet.  we might have to think about computing it 
>> based on the number of messages to delete and the number of messages 
>> in the folder.) 
> 
> 
> Awesome. One thing, though, I think the number of messages in the folder 
> is not as important as the number of messages on screen, since it's the 
> messages on screen that reflow. But I think <n> could be as small as 2 
> or 3. We'll have to see.

more info:

When I use the tree batching API, here's a scenario where I see a big 
performance win:

have folder with 1000 messages
scroll down to message 500
select messages 25
scroll down a little more so the selected messages are off screen
hit delete

If I don't use batching, after ever delete happens, we automatically 
scroll up one line, and we have some repaint problems.  (we've all seen 
this.)

when I use batching, the automatic scrolling only happens when all the 
deletes are complete.

When deleting doesn't cause scrolling, I don't think we suffer the same 
performance problems.

-Seth


Reply via email to