[Cyberduck-trac] [Cyberduck] #12: Excessive CPU usage downloading many files

Cyberduck trac at svn.cyberduck.ch
Tue Nov 22 12:44:23 CET 2005


#12: Excessive CPU usage downloading many files
---------------------+------------------------------------------------------
       Id:  12       |      Status:  new                      
Component:  core     |    Modified:  Tue Nov 22 12:44:22 2005 
 Severity:  normal   |   Milestone:  2.6                      
 Priority:  normal   |     Version:                           
    Owner:  dkocher  |    Reporter:  derrick at tapir.caltech.edu
---------------------+------------------------------------------------------
Changes (by dkocher):

  * status:  assigned => new
  * owner:  anonymous => dkocher

Old description:

> CyberDuck 2.5.2 uses lots of CPU when downloading many small files. The
> output from sample indicates that all the time is being spent in a
> routine called Java_ch_cyberduck_core_Local_setIconFromFile which calling
> into routines doing all sorts of JPEG processing! (I'm downloading a
> directory of several thousand small files via sftp.)
>
> Here is the full text of the sample output:
>
> Analysis of sampling pid 489 every 10.000000 milliseconds
> Call graph:
>     61 Thread_100f
>       61 start
>         61 _start
>           61 NSApplicationMain
>             61 -[NSApplication run]
>               61 -[NSApplication
> nextEventMatchingMask:untilDate:inMode:dequeue:]
>                 61 _DPSNextEvent
>                   61 BlockUntilNextEventMatchingListInMode
>                     61 ReceiveNextEventCommon
>                       61 RunCurrentEventLoopInMode
>                         61 CFRunLoopRunSpecific
>                           60 __CFRunLoopRun
>                             51 mach_msg
>                               51 mach_msg_trap
>                                 51 mach_msg_trap
>                             6 __CFRunLoopDoObservers
>                               2 _handleWindowNeedsDisplay
>                                 2 -[NSWindow displayIfNeeded]
>                                   2 -[NSView displayIfNeeded]
>                                     2 -[NSView
> _displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:]
>                                       1 -[NSThemeFrame
> _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]
>                                         1 -[NSView
> _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]
>                                           1 -[NSView
> _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]
>                                             1 -[NSView
> _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]
>                                               1 -[NSView
> _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]
>                                                 1 -[NSView
> _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]
>                                                   1 -[NSView
> _drawRect:clip:]
>                                                     1 -[NSTableView
> drawRect:]
>                                                       1 -[NSTableView
> drawBackgroundInClipRect:]
>                                                         1 -[NSTableView
> _drawAlternatingRowBackgroundColors:inRect:]
>                                                           1
> NSRectFillList
>                                                             1
> CGContextFillRects
>                                                               1
> __CGContextDrawRects
>                                                                 1
> ripc_DrawRects
>                                                                   1
> ripc_Render
>                                                                     1
> ripl_BltShape
>                                                                       1
> ripd_Lock
>                                                                         1
> CGSDeviceLock
> 1 _CGSLockWindow
> 1 _CGSSynchronizeWindowBackingStore
> 1 mach_msg
> 1 mach_msg_trap
> 1 mach_msg_trap
>                                       1 -[NSWindow flushWindow]
>                                         1 ripc_Context
>                                           1 CGSDeviceSynchronize
>                                             1 _CGSFlushWindowRegion
>                                               1 _CGSFlushRegionInline
>                                                 1 mach_msg
>                                                   1 mach_msg_trap
>                                                     1 mach_msg_trap
>                               2 setBusy
>                                 2 JVM_SupportsCX8
>                                   2 JVM_MaxMemory
>                                     2 jio_snprintf
>                                       2 jio_snprintf
>                                         2 0x472f16c
>                                           1 0x4897520
>                                             1 0x4878788
>                                               1 0x486a35c
>                                                 1 JVM_MonitorNotifyAll
>                                                   1 __ucmpdi2
>                                                     1 JVM_MonitorWait
>                                                       1 jio_snprintf
>                                                         1 mach_msg
>                                                           1 mach_msg_trap
>                                                             1
> mach_msg_trap
>                                           1 0x48976e0
>                                             1 0x487882c
>                                               1 0x486a35c
>                                                 1 JVM_MonitorNotifyAll
>                                                   1 __ucmpdi2
>                                                     1 JVM_MonitorWait
>                                                       1 jio_snprintf
>                                                         1 mach_msg
>                                                           1 mach_msg_trap
>                                                             1
> mach_msg_trap
>                               1 _CFRelease
>                                 1 malloc_zone_free
>                                   1 malloc_zone_free
>                               1 __CFArrayInit
>                                 1 _CFRuntimeCreateInstance
>                                   1 CFAllocatorAllocate
>                                     1 malloc_zone_malloc
>                                       1 szone_malloc
>                                         1 szone_malloc
>                             1 __CFRunLoopDoSources0
>                               1 __CFRunLoopPerformPerform
>                                 1 __NSFireMainThreadPerform
>                                   1 -[NSWindow dealloc]
>                                     1 -[NSWindow _termWindowIfOwner]
>                                       1 -[NSWindow _setWindowNumber:]
>                                         1 -[NSCGSContext _invalidate]
>                                           1 _CFRelease
>                                             1 contextFinalize
>                                               1 _CFRelease
>                                                 1 contextDelegateFinalize
>                                                   1 ripc_Finalize
>                                                     1 ripc_Scavange
>                                                       1 szone_free
>                                                         1 vm_deallocate
>                                                           1 mach_msg
>                                                             1
> mach_msg_trap
>                                                               1
> mach_msg_trap
>                             1 __CFRunLoopDoTimer
>                               1 __NSFireTimer
>                                 1 _BRIDGEMethodImp
>                                   1 _NSInvokeJavaMethod
>                                     1 JAVAMethodInvokeVoid
>                                       1 __JAVAMethodInvoke
>                                         1 JVM_GetSockOpt
>                                           1 JVM_FindPrimitiveClass
>                                             1 jio_snprintf
>                                               1 jio_snprintf
>                                                 1 0x472f16c
>                                                   1 0x491a264
>                                                     1 0x491a810
>                                                       1 0x47a5100
>                                                         1 0x47a5100
>                             1 mach_port_insert_member
>                               1 mach_msg
>                                 1 mach_msg_trap
>                                   1 mach_msg_trap
>                           1 __CFRunLoopDoObservers
>                             1 __CFRunLoopDoObservers
>     61 Thread_1103
>       61 _pthread_body
>         61 operator new(unsigned long)
>           61 operator new(unsigned long)
>             61 operator new(unsigned long)
>               61 mach_msg
>                 61 mach_msg_trap
>                   61 mach_msg_trap
>     61 Thread_1203
>       61 _pthread_body
>         61 operator new(unsigned long)
>           61 jio_snprintf
>             61 jio_snprintf
>               61 jio_snprintf
>                 61 jio_snprintf
>                   61 mach_msg
>                     61 mach_msg_trap
>                       61 mach_msg_trap
>     61 Thread_1303
>       61 _pthread_body
>         61 operator new(unsigned long)
>           61 JVM_StartThread
>             61 JVM_StartThread
>               61 JVM_StartThread
>                 61 JVM_StartThread
>                   61 jio_snprintf
>                     61 jio_snprintf
>                       61 0x472f16c
>                         61 0x4731fb0
>                           61 0x4897ae8
>                             61 0x4878024
>                               61 JVM_MonitorWait
>                                 61 JVM_MonitorWait
>                                   61 JVM_MonitorWait
>                                     61 jio_snprintf
>                                       61 mach_msg
>                                         61 mach_msg_trap
>                                           61 mach_msg_trap
>     61 Thread_1403
>       61 _pthread_body
>         61 operator new(unsigned long)
>           61 JVM_StartThread
>             61 JVM_StartThread
>               61 JVM_StartThread
>                 61 JVM_StartThread
>                   61 jio_snprintf
>                     61 jio_snprintf
>                       61 0x472f16c
>                         61 0x4731ec0
>                           61 0x48ec5e8
>                             61 0x48ec888
>                               61 0x4878024
>                                 61 JVM_MonitorWait
>                                   61 JVM_MonitorWait
>                                     61 JVM_MonitorWait
>                                       61 jio_snprintf
>                                         61 mach_msg
>                                           61 mach_msg_trap
>                                             61 mach_msg_trap
>     61 Thread_1503
>       61 _pthread_body
>         61 operator new(unsigned long)
>           61 JVM_InternString
>             61 JVM_InternString
>               61 jio_snprintf
>                 61 mach_msg
>                   61 mach_msg_trap
>                     61 mach_msg_trap
>     61 Thread_1603
>       61 _pthread_body
>         61 operator new(unsigned long)
>           61 JVM_StartThread
>             61 JVM_InternString
>               61 JVM_InternString
>                 61 semaphore_wait_trap
>                   61 semaphore_wait_trap
>     61 Thread_1703
>       61 _pthread_body
>         61 operator new(unsigned long)
>           61 JVM_StartThread
>             61 JVM_InternString
>               61 JVM_InternString
>                 61 jio_snprintf
>                   61 jio_snprintf
>                     61 mach_msg
>                       61 mach_msg_trap
>                         61 mach_msg_trap
>     61 Thread_1803
>       61 _pthread_body
>         61 thread_func
>           61 select
>             61 select
>     61 Thread_1903
>       61 _pthread_body
>         61 __ape_agent
>           61 __ape_internal
>             61 mach_msg
>               61 mach_msg_trap
>                 61 mach_msg_trap
>     61 Thread_1a03
>       61 _pthread_body
>         61 forkThreadForFunction
>           61 +[NSURLConnection(NSURLConnectionInternal)
> _resourceLoadLoop:]
>             61 CFRunLoopRunSpecific
>               61 __CFRunLoopRun
>                 61 mach_msg
>                   61 mach_msg_trap
>                     61 mach_msg_trap
>     61 Thread_1b03
>       61 _pthread_body
>         61 operator new(unsigned long)
>           61 JVM_StartThread
>             61 JVM_StartThread
>               61 JVM_StartThread
>                 61 JVM_StartThread
>                   61 jio_snprintf
>                     61 jio_snprintf
>                       61 0x472f16c
>                         61 0x4731fb0
>                           61 0x4731fb0
>                             61 0x4738580
>                               61 JVM_MonitorWait
>                                 61 JVM_MonitorWait
>                                   61 JVM_MonitorWait
>                                     61 jio_snprintf
>                                       61 mach_msg
>                                         61 mach_msg_trap
>                                           61 mach_msg_trap
>     61 Thread_1c03
>       61 _pthread_body
>         61 operator new(unsigned long)
>           61 JVM_StartThread
>             61 JVM_StartThread
>               61 JVM_StartThread
>                 61 JVM_StartThread
>                   61 jio_snprintf
>                     61 jio_snprintf
>                       61 0x472f16c
>                         61 0x4732310
>                           61 0x4731fb0
>                             61 0x4731fb0
>                               61 0x4738c4c
>                                 61
> Java_java_net_PlainDatagramSocketImpl_receive
>                                   61 recvfrom
>                                     61 recvfrom
>     61 Thread_1d03
>       61 _pthread_body
>         61 __CFSocketManager
>           61 select
>             61 select
>     61 Thread_1e03
>       61 _pthread_body
>         61 forkThreadForFunction
>           61 +[NSURLCache _diskCacheSyncLoop:]
>             61 CFRunLoopRunSpecific
>               61 __CFRunLoopRun
>                 61 mach_msg
>                   61 mach_msg_trap
>                     61 mach_msg_trap
>     61 Thread_1f03
>       61 _pthread_body
>         61 forkThreadForFunction
>           61 -[NSUIHeartBeat _heartBeatThread:]
>             58 +[NSThread sleepUntilDate:]
>               58 syscall_thread_switch
>                 58 syscall_thread_switch
>             2 -[NSProgressIndicator heartBeat:]
>               2 -[NSProgressIndicator _drawThemeProgressArea:]
>                 2 _NSTileImage
>                   2 _NSTileImageWithOperation
>                     2 -[NSImage
> _compositeFlipped:atPoint:fromRect:operation:fraction:]
>                       2 -[NSImage
> _compositeFlipped:inRect:fromRect:operation:fraction:]
>                         2 -[NSImage
> drawInRect:fromRect:operation:fraction:]
>                           2 -[NSBitmapImageRep
> _drawFromRect:toRect:operation:alpha:compositing:flipped:ignoreContext:]
>                             2 CGContextDrawImage
>                               2 CGContextDelegateDrawImage
>                                 2 ripc_DrawImage
>                                   1 ripc_AcquireImage
>                                     1 CGSImageDataLockWithReference
>                                       1 img_data_lock
>                                         1 malloc_zone_malloc
>                                           1 malloc_zone_malloc
>                                   1 ripc_RenderImage
>                                     1 ripl_BltImage
>                                       1 ripd_Lock
>                                         1 CGSDeviceLock
>                                           1 _CGSLockWindow
>                                             1
> _CGSSynchronizeWindowBackingStore
>                                               1 mach_msg
>                                                 1 mach_msg_trap
>                                                   1 mach_msg_trap
>             1 -[NSView canDraw]
>               1 objc_msgSend_rtp
>                 1 objc_msgSend_rtp
>     61 Thread_2003
>       61 _pthread_body
>         61 operator new(unsigned long)
>           61 JVM_StartThread
>             61 JVM_StartThread
>               61 JVM_StartThread
>                 61 JVM_StartThread
>                   61 jio_snprintf
>                     61 jio_snprintf
>                       61 0x472f16c
>                         61 0x4732310
>                           61 0x4731fb0
>                             61 0x4731ec0
>                               61 0x48d4424
>                                 61 0x48ceff4
>                                   61 0x48a1454
>                                     61 0x48d0f30
>                                       61 0x48d183c
>                                         61 0x48d212c
>                                           61 0x48d3850
>                                             61
> Java_java_net_SocketInputStream_socketRead0
>                                               61 read
>                                                 61 read
>     61 Thread_2103
>       61 _pthread_body
>         61 PrivateMPEntryPoint
>           61 TFSNotificationTask::FSNotificationTaskProc(void*)
>             61 kevent
>               61 kevent
>     61 Thread_2203
>       61 _pthread_body
>         61 PrivateMPEntryPoint
>           61 TNodeSyncTask::SyncTaskProc(void*)
>             61 MPWaitOnQueue
>               61 pthread_cond_wait
>                 61 semaphore_wait_signal_trap
>                   61 semaphore_wait_signal_trap
>     61 Thread_2303
>       61 _pthread_body
>         61 operator new(unsigned long)
>           61 JVM_StartThread
>             61 JVM_StartThread
>               61 JVM_StartThread
>                 61 JVM_StartThread
>                   61 jio_snprintf
>                     61 jio_snprintf
>                       61 0x472f16c
>                         61 0x4732310
>                           59 0x4731fb0
>                             59 0x4738580
>                               59 JVM_MonitorWait
>                                 59 JVM_MonitorWait
>                                   59 JVM_MonitorWait
>                                     59 jio_snprintf
>                                       59 mach_msg
>                                         59 mach_msg_trap
>                                           59 mach_msg_trap
>                           2 0x4731f20
>                             2 0x48ee0f8
>                               2 0x49228b0
>                                 1 0x491bea0
>                                   1 0x491c7bc
>                                     1 0x49212c8
>                                       1 0x486a35c
>                                         1 JVM_MonitorNotifyAll
>                                           1 JVM_MonitorWait
>                                             1 JVM_MonitorWait
>                                 1 0x491bf9c
>                                   1 0x47a5480
>                                     1 JVM_Sleep
>                                       1 JVM_MonitorWait
>                                         1 jio_snprintf
>                                           1 mach_msg
>                                             1 mach_msg_trap
>                                               1 mach_msg_trap
>     61 Thread_2403
>       61 _pthread_body
>         61 operator new(unsigned long)
>           61 JVM_StartThread
>             61 JVM_StartThread
>               61 JVM_StartThread
>                 61 JVM_StartThread
>                   61 jio_snprintf
>                     61 jio_snprintf
>                       61 0x472f16c
>                         61 0x4732310
>                           54 0x48a01b0
>                             54 0x4878024
>                               54 JVM_MonitorWait
>                                 54 JVM_MonitorWait
>                                   54 JVM_MonitorWait
>                                     54 jio_snprintf
>                                       54 mach_msg
>                                         54 mach_msg_trap
>                                           54 mach_msg_trap
>                           7 0x48a00cc
>                             7 0x4878024
>                               7 JVM_MonitorWait
>                                 7 JVM_MonitorWait
>                                   7 JVM_MonitorWait
>                                     7 jio_snprintf
>                                       7 mach_msg
>                                         7 mach_msg_trap
>                                           7 mach_msg_trap
>     61 Thread_2503
>       61 _pthread_body
>         61 operator new(unsigned long)
>           61 JVM_StartThread
>             61 JVM_StartThread
>               61 JVM_StartThread
>                 61 JVM_StartThread
>                   61 jio_snprintf
>                     61 jio_snprintf
>                       61 0x472f16c
>                         61 0x4731fb0
>                           61 0x4731fb0
>                             61 0x4731fb0
>                               57 0x4731fb0
>                                 30 0x4914d0c
>                                   29 0x491f718
>                                     29 0x492e504
>                                       29
> Java_ch_cyberduck_core_Local_setIconFromFile
>                                         29 -[NSWorkspace
> setIcon:forFile:options:]
>                                           28 _NSIconFamilyFromImage
>                                             28
> _NSAddCompressedARGBIconFamilyElement
>                                               23 SetIconFamilyData
>                                                 22
> _cg_JP2SimpleARGBCompressAlloc
>                                                   21
> JP2Compress(JP2CompressionSettings const*, unsigned long, int, unsigned
> const*, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned,
> unsigned, unsigned char*, unsigned long*)
>                                                     18
> kdc_flow_control::process_components()
>                                                       18
> kd_analysis::push(kdu_line_buf&, bool)
>                                                         12
> kd_analysis::horizontal_analysis(kd_line_cosets&)
>                                                           9
> kd_analysis::push(kdu_line_buf&, bool)
>                                                             6
> kd_analysis::horizontal_analysis(kd_line_cosets&)
>                                                               6
> kd_analysis::push(kdu_line_buf&, bool)
>                                                                 3
> kd_analysis::horizontal_analysis(kd_line_cosets&)
>                                                                   2
> kd_encoder::encode_row_of_blocks()
>                                                                     2
> kd_block_encoder::encode(kdu_block*, bool, double, unsigned short)
>                                                                       1
> encode_cleanup_pass(mq_encoder&, mqe_state*, int, bool, int, int*, int*,
> int, int, int, bool)
>                                                                         1
> encode_cleanup_pass(mq_encoder&, mqe_state*, int, bool, int, int*, int*,
> int, int, int, bool)
>                                                                       1
> find_convex_hull(int*, double*, unsigned short*, int)
>                                                                         1
> log
> 1 log
>                                                                   1
> kd_encoder::push(kdu_line_buf&, bool)
>                                                                     1
> __memcpy
>                                                                       1
> __memcpy
>                                                                 2
> kd_analysis::push(kdu_line_buf&, bool)
>                                                                 1
> kd_encoder::encode_row_of_blocks()
>                                                                   1
> kd_encoder::encode_row_of_blocks()
>                                                             3
> kd_encoder::encode_row_of_blocks()
>                                                               3
> kd_encoder::encode_row_of_blocks()
>                                                           3
> kd_encoder::encode_row_of_blocks()
>                                                             2
> kd_block_encoder::encode(kdu_block*, bool, double, unsigned short)
>                                                               1
> encode_cleanup_pass(mq_encoder&, mqe_state*, int, bool, int, int*, int*,
> int, int, int, bool)
>                                                                 1
> encode_cleanup_pass(mq_encoder&, mqe_state*, int, bool, int, int*, int*,
> int, int, int, bool)
>                                                               1
> encode_mag_ref_pass(mq_encoder&, mqe_state*, int, bool, int*, int*, int,
> int, int, bool)
>                                                                 1
> encode_mag_ref_pass(mq_encoder&, mqe_state*, int, bool, int*, int*, int,
> int, int, bool)
>                                                             1
> kd_encoder::encode_row_of_blocks()
>                                                         4
> kd_encoder::encode_row_of_blocks()
>                                                           2
> kd_block_encoder::encode(kdu_block*, bool, double, unsigned short)
>                                                             2
> encode_cleanup_pass(mq_encoder&, mqe_state*, int, bool, int, int*, int*,
> int, int, int, bool)
>                                                               2
> encode_cleanup_pass(mq_encoder&, mqe_state*, int, bool, int, int*, int*,
> int, int, int, bool)
>                                                           2
> kd_encoder::encode_row_of_blocks()
>                                                         2
> kd_encoder::push(kdu_line_buf&, bool)
>                                                           2 __memcpy
>                                                             2 __memcpy
>                                                     2
> kdu_codestream::flush(long*, int, unsigned short*, bool)
>                                                       2
> kd_codestream::pcrd_opt(long*, unsigned short*, int, bool)
>                                                         2
> kd_codestream::simulate_output(long&, int, unsigned short, bool, bool,
> long, long*)
>                                                           1
> kd_tile::simulate_output(long&, int, unsigned short, bool, bool, long,
> long*)
>                                                             1
> kd_precinct::simulate_packet(long&, int, unsigned short, bool, bool,
> long, bool)
>                                                               1
> kd_precinct::simulate_packet(long&, int, unsigned short, bool, bool,
> long, bool)
>                                                           1
> kdu_params::generate_marker_segments(kdu_output*, int, int)
>                                                             1
> cod_params::write_marker_segment(kdu_output*, kdu_params*, int)
>                                                               1
> match_attribute(kd_attribute*, char const*)
>                                                                 1
> match_attribute(kd_attribute*, char const*)
>                                                     1
> kdc_flow_control::~kdc_flow_control [unified]()
>                                                       1 operator
> delete[](void*)
>                                                         1 operator
> delete(void*)
>                                                           1 szone_free
>                                                             1
> vm_deallocate
>                                                               1 mach_msg
>                                                                 1
> mach_msg_trap
>                                                                   1
> mach_msg_trap
>                                                   1
> kdu_codestream::create(siz_params*, kdu_compressed_target*)
>                                                     1
> kdu_codestream::create(siz_params*, kdu_compressed_target*)
>                                                 1 _ISSetIconData
>                                                   1
> CIconStorageLocalEntry::SetData(long, char*, long)
>                                                     1
> CIconStorageLocalEntry::SetData(long, char*, long)
>                                               4
> _NSIconBitmapImageRepFromImage
>                                                 1 -[NSBitmapImageRep
> initWithFocusedViewRect:]
>                                                   1 _NSReadImage
>                                                     1 _NSImageMalloc
>                                                       1
> malloc_zone_malloc
>                                                         1 szone_malloc
>                                                           1
> large_and_huge_malloc
>                                                             1 vm_allocate
>                                                               1 mach_msg
>                                                                 1
> mach_msg_trap
>                                                                   1
> mach_msg_trap
>                                                 1 -[NSImage dealloc]
>                                                   1 -[NSImage
> _freeRepresentation:]
>                                                     1 -[NSCachedImageRep
> dealloc]
>                                                       1 _NXFreeImageCache
>                                                         1
> -[NSObject(NSMainThreadPerformAdditions)
> performSelectorOnMainThread:withObject:waitUntilDone:]
>                                                           1
> -[NSObject(NSMainThreadPerformAdditions)
> performSelectorOnMainThread:withObject:waitUntilDone:modes:]
>                                                             1
> _CFRunLoopPerformEnqueue
>                                                               1
> CFRunLoopWakeUp
>                                                                 1
> __CFSendTrivialMachMessage
>                                                                   1
> mach_msg
>                                                                     1
> mach_msg_trap
>                                                                       1
> mach_msg_trap
>                                                 1 -[NSImage
> drawInRect:fromRect:operation:fraction:]
>                                                   1 -[NSBitmapImageRep
> _drawFromRect:toRect:operation:alpha:compositing:flipped:ignoreContext:]
>                                                     1 CGContextDrawImage
>                                                       1
> CGContextDelegateDrawImage
>                                                         1 ripc_DrawImage
>                                                           1
> ripc_AcquireImage
>                                                             1
> CGSImageDataLockWithReference
>                                                               1
> img_data_lock
>                                                                 1
> img_alphamerge_read
>                                                                   1
> img_raw_read
>                                                                     1
> CGAccessSessionGetChunks
>                                                                       1
> __memcpy
>                                                                         1
> __memcpy
>                                                 1 -[NSImage lockFocus]
>                                                   1 -[NSCachedImageRep
> _initWithSize:depth:separate:alpha:allowDeep:]
>                                                     1
> _NXAllocateImageCache
>                                                       1 GetSharedSpaceFor
>                                                         1
> NewCacheWindowInfo
>                                                           1
> CreateCacheWindow
>                                                             1
> CreateWindowNamed
>                                                               1
> _NXCreateWindow
>                                                                 1
> CGSNewWindow
>                                                                   1
> CGSNewWindowWithOpaqueShape
>                                                                     1
> _CGSCreateWindow
>                                                                       1
> mach_msg
>                                                                         1
> mach_msg_trap
> 1 mach_msg_trap
>                                               1
> _NSAddCompressedARGBIconFamilyElement
>                                           1 -[NSString(NSWorkspaceStatic)
> _getFSRefForPath:]
>                                             1 objc_msgSend_rtp
>                                               1 objc_msgSend_rtp
>                                   1 0x491f7dc
>                                     1 0x49247f0
>                                       1
> Java_com_apple_cocoa_application_NSWorkspace_noteFileSystemChangedAtPath
>                                         1 -[NSWorkspace
> noteFileSystemChanged:]
>                                           1 objc_msgSend_rtp
>                                             1 objc_msgSend_rtp
>                                 11 0x4914d54
>                                   11 0x48d0f30
>                                     11 0x48d183c
>                                       11 0x4926318
>                                         10 0x4928a6c
>                                           10 0x48e0350
>                                             10 0x4878024
>                                               10 JVM_MonitorWait
>                                                 10 JVM_MonitorWait
>                                                   10 JVM_MonitorWait
>                                                     10 jio_snprintf
>                                                       10 mach_msg
>                                                         10 mach_msg_trap
>                                                           10
> mach_msg_trap
>                                         1 0x4928a54
>                                           1 0x4910670
>                                             1 0x48c2148
>                                               1 0x48c0258
>                                                 1 0x48e1ad8
>                                                   1 0x48d8f88
>                                                     1 0x48dccb4
>                                                       1 0x48dd0a0
>                                                         1 0x48dda8c
>                                                           1
> Java_java_net_SocketOutputStream_socketWrite0
>                                                             1 sendto
>                                                               1 sendto
>                                 8 0x4914f10
>                                   8 0x491f718
>                                     8 0x492e504
>                                       8
> Java_ch_cyberduck_core_Local_setIconFromFile
>                                         8 -[NSWorkspace
> setIcon:forFile:options:]
>                                           6 _NSIconFamilyFromImage
>                                             6
> _NSAddCompressedARGBIconFamilyElement
>                                               3
> _NSIconBitmapImageRepFromImage
>                                                 1 -[NSBitmapImageRep
> initWithFocusedViewRect:]
>                                                   1 _NSReadImage
>                                                     1 _NSReadImage
>                                                 1 -[NSImage
> drawInRect:fromRect:operation:fraction:]
>                                                   1 -[NSBitmapImageRep
> _drawFromRect:toRect:operation:alpha:compositing:flipped:ignoreContext:]
>                                                     1 CGContextDrawImage
>                                                       1
> CGContextDelegateDrawImage
>                                                         1 ripc_DrawImage
>                                                           1
> ripc_RenderImage
>                                                             1
> ripl_BltImage
>                                                               1 ripd_Mark
>                                                                 1
> ARGB32_image
>                                                                   1
> ARGB32_image_mark
>                                                                     1
> ARGB32_image_ARGB32
>                                                                       1
> ARGB32_image_ARGB32
>                                                 1 -[NSImage lockFocus]
>                                                   1 -[NSCachedImageRep
> _initWithSize:depth:separate:alpha:allowDeep:]
>                                                     1
> _NXAllocateImageCache
>                                                       1 NSRectFill
>                                                         1
> CGContextFillRect
>                                                           1
> CGContextFillRects
>                                                             1
> __CGContextDrawRects
>                                                               1
> ripc_DrawRects
>                                                                 1
> ripc_Render
>                                                                   1
> ripl_BltShape
>                                                                     1
> ripd_Mark
>                                                                       1
> ARGB32_mark
>                                                                         1
> ARGB32_mark_constantshape
> 1 CGBlt_fillBytes
> 1 CGSFillDRAM8by1
> 1 vecCGSFill8by1
> 1 vecCGSFill8by1
>                                               2
> _NSAddCompressedARGBIconFamilyElement
>                                               1 SetIconFamilyData
>                                                 1
> _cg_JP2SimpleARGBCompressAlloc
>                                                   1
> JP2Compress(JP2CompressionSettings const*, unsigned long, int, unsigned
> const*, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned,
> unsigned, unsigned char*, unsigned long*)
>                                                     1
> kdu_params::finalize_all()
>                                                       1
> kdu_params::finalize_all()
>                                                         1
> kdu_params::finalize_all()
>                                                           1
> kdu_params::finalize_all()
>                                                             1
> cod_params::finalize()
>                                                               1
> kdu_params::get(char const*, int, int, int&, bool, bool, bool)
>                                                                 1
> kdu_params::get(char const*, int, int, int&, bool, bool, bool)
>                                                                   1
> kdu_params::get(char const*, int, int, int&, bool, bool, bool)
>                                                                     1
> kdu_params::get(char const*, int, int, int&, bool, bool, bool)
>                                           1 +[NSFileAttributes
> attributesAtPath:traverseLink:]
>                                             1
> FSPathMakeRefInternal(unsigned char const*, unsigned long, unsigned long,
> FSRef*, unsigned char*)
>                                               1 PathGetObjectInfo(char
> const*, unsigned long, unsigned long, VolumeInfo**, unsigned long*,
> unsigned long*, char*, unsigned long*, unsigned char*)
>                                                 1
> GetPathVolFSAttributes(char const*, unsigned long, FSAttributeInfo*,
> unsigned long, unsigned char*)
>                                                   1 getattrlist
>                                                     1 getattrlist
>                                           1 CloseResFileCommon
>                                             1 UpdateResFileCommon
>                                               1 UpdateTheFile
>                                                 1 SetResourceEOF
>                                                   1 PBSetEOFSync
>                                                     1 PBSetForkSizeSync
>                                                       1
> SetForkLength(FileRecord*, unsigned char, unsigned long long, unsigned
> long long*)
>                                                         1
> ftruncate_opt(int, unsigned long long, long long)
>                                                           1 ftruncate
>                                                             1 ftruncate
>                                 4 0x4926e44
>                                   4 0x492b2b4
>                                     4 0x4731ec0
>                                       4 0x48e0350
>                                         4 0x4878024
>                                           4 JVM_MonitorWait
>                                             4 JVM_MonitorWait
>                                               4 JVM_MonitorWait
>                                                 4 jio_snprintf
>                                                   4 mach_msg
>                                                     4 mach_msg_trap
>                                                       4 mach_msg_trap
>                                 3 0x4915008
>                                   3 0x491f558
>                                     2 0x4731fb0
>                                       2 0x4731fb0
>                                         2 0x4731ec0
>                                           2 0x4731ec0
>                                             2 0x4731ec0
>                                               2 0x4738580
>                                                 2
> Java_java_io_UnixFileSystem_canonicalize0
>                                                   2 canonicalize
>                                                     2 canonicalize
>                                                       2 canonicalize
>                                                         2 getdirentries
>                                                           2 getdirentries
>                                     1 0x4731ec0
>                                       1 0x4731fb0
>                                         1 0x4731fb0
>                                           1 0x492c950
>                                             1 0x4738580
>                                               1 JVM_Yield
>                                                 1 syscall_thread_switch
>                                                   1 syscall_thread_switch
>                                 1 0x4731fb0
>                                   1 0x49205f0
>                                     1 0x48e81b0
>                                       1 0x4740b1c
>                                         1 __ucmpdi2
>                                           1 jio_snprintf
>                                             1 jio_snprintf
>                               4 0x4731ec0
>                                 4 0x4731ec0
>                                   4 0x4731ec0
>                                     4 0x4731ec0
>                                       4 0x48e0350
>                                         4 0x4878024
>                                           4 JVM_MonitorWait
>                                             4 JVM_MonitorWait
>                                               4 JVM_MonitorWait
>                                                 4 jio_snprintf
>                                                   4 mach_msg
>                                                     4 mach_msg_trap
>                                                       4 mach_msg_trap
>     61 Thread_2603
>       61 _pthread_body
>         61 operator new(unsigned long)
>           61 JVM_StartThread
>             61 JVM_StartThread
>               61 JVM_StartThread
>                 61 JVM_StartThread
>                   61 jio_snprintf
>                     61 jio_snprintf
>                       61 0x472f16c
>                         61 0x4732310
>                           61 0x4731fb0
>                             61 0x4731ec0
>                               61 0x48d4424
>                                 61 0x48ceff4
>                                   61 0x48a1454
>                                     61 0x48d0f30
>                                       61 0x48d183c
>                                         61 0x48d212c
>                                           61 0x48d3850
>                                             61
> Java_java_net_SocketInputStream_socketRead0
>                                               61 read
>                                                 61 read
>     61 Thread_2703
>       61 _pthread_body
>         61 operator new(unsigned long)
>           61 JVM_StartThread
>             61 JVM_StartThread
>               61 JVM_StartThread
>                 61 JVM_StartThread
>                   61 jio_snprintf
>                     61 jio_snprintf
>                       61 0x472f16c
>                         61 0x4731fb0
>                           61 0x4731fb0
>                             61 0x4731fb0
>                               61 0x4731e30
>                                 60 0x491b134
>                                   60 0x48c7b94
>                                     60 0x4878024
>                                       60 JVM_MonitorWait
>                                         60 JVM_MonitorWait
>                                           60 JVM_MonitorWait
>                                             60 jio_snprintf
>                                               60 mach_msg
>                                                 60 mach_msg_trap
>                                                   60 mach_msg_trap
>                                 1 0x491b410
>                                   1 0x491df20
>                                     1 0x490db9c
>                                       1 0x4911f48
>                                         1 0x48efe10
>                                           1 0x48c3e58
>                                             1 0x47a5100
>                                               1 0x47a5100
>
> Total number in stack (recursive counted multiple, when >=5):
>         45       jio_snprintf
>         42       JVM_StartThread
>         34       JVM_MonitorWait
>         30       mach_msg
>         30       mach_msg_trap
>         23       _pthread_body
>         20       0x4731fb0
>         17       operator new(unsigned long)
>         12       0x472f16c
>         12       0x4731ec0
>         8       0x4878024
>         6       JVM_InternString
>         5       -[NSView
> _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]
>         5       0x4732310
>         5       kd_encoder::encode_row_of_blocks()
>
> Sort by top of stack, same collapsed (when >= 5):
>         mach_msg_trap        871
>         read        122
>         select        122
>         kevent        61
>         recvfrom        61
>         semaphore_wait_signal_trap        61
>         semaphore_wait_trap        61
>         syscall_thread_switch        59
>         kd_encoder::encode_row_of_blocks()        7
> Sample analysis of process 489 written to file /dev/stdout
> Sampling process 489 each 10 msecs 100 times

New description:

 CyberDuck 2.5.2 uses lots of CPU when downloading many small files. The
 output from sample indicates that all the time is being spent in a routine
 called Java_ch_cyberduck_core_Local_setIconFromFile which calling into
 routines doing all sorts of JPEG processing! (I'm downloading a directory
 of several thousand small files via sftp.)

-- 
Ticket URL: <http://svn.cyberduck.ch/trac/cyberduck/ticket/12>
Cyberduck <http://cyberduck.ch>
FTP and SFTP Browser for Mac OS X.


More information about the Cyberduck-trac mailing list