Opened 6 years ago

Closed 6 years ago

#3001 closed enhancement (fixed)

Session save slow with molecular surfaces

Reported by: goddard@… Owned by: Tom Goddard
Priority: normal Milestone:
Component: Sessions Version:
Keywords: Cc:
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

The following bug report has been submitted:
Platform:        Darwin-19.3.0-x86_64-i386-64bit
ChimeraX Version: 0.93 (2020-03-31)
Description
Saving a session with a molecular surface is incredibly slow, 52 seconds for a 60,000 atom structure.  Without the molecular surface it takes 1 second.  Session file size is 160 Mbytes with surface, 1.5 Mbytes without surface.

Log:
UCSF ChimeraX version: 0.93 (2020-03-31)  
© 2016-2020 Regents of the University of California. All rights reserved.  
How to cite UCSF ChimeraX  

> open 1aon format mmCIF fromDatabase pdb

1aon title:  
Crystal structure of the asymmetric chaperonin complex groel/groes/(adp)7
[more info...]  
  
Chain information for 1aon #1  
---  
Chain | Description  
A B C D E F G H I J K L M N | GROEL  
O P Q R S T U | groel/groes complex  
  
Non-standard residues in 1aon #1  
---  
ADP — adenosine-5'-diphosphate  
MG — magnesium ion  
  
  
Change tracker changes 4.410743713378906e-05  
atomic get changes 0.0010480880737304688  
atomic clear changes 1.71661376953125e-05  
atomic check changes 0.0023050308227539062  

> surface

> hide atoms

Change tracker changes 0.011063098907470703  
atomic get changes 0.01232004165649414  
atomic clear changes 0.010286092758178711  
atomic check changes 0.02386307716369629  

> time save test.cxs

> save test.cxs

command time 52.76 seconds  
draw time 0.03965 seconds  

> surface close

> show atoms

Change tracker changes 0.011584043502807617  
atomic get changes 0.013190031051635742  
atomic clear changes 0.01009678840637207  
atomic check changes 0.027158021926879883  

> time save test2.cxs

> save test2.cxs

command time 1.157 seconds  

> select

58870 atoms, 59290 bonds, 27 pseudobonds, 2 models selected  
Change tracker changes 0.024118900299072266  
atomic get changes 0.025615930557250977  
atomic clear changes 0.022425174713134766  
atomic check changes 0.0494842529296875  
draw time 33.74 seconds  




OpenGL version: 4.1 ATI-3.5.5
OpenGL renderer: AMD Radeon Pro Vega 20 OpenGL Engine
OpenGL vendor: ATI Technologies Inc.

Change History (5)

in reply to:  1 ; comment:1 by goddard@…, 6 years ago

Opening the sessions is relatively fast, 2.5 seconds with surface, 0.2 seconds without surface.

comment:2 by Tom Goddard, 6 years ago

Component: UnassignedSessions
Owner: set to Tom Goddard
Platform: all
Project: ChimeraX
Status: newassigned
Summary: ChimeraX bug report submissionSession save slow with molecular surfaces
Type: defectenhancement

comment:3 by Tom Goddard, 6 years ago

The problem is the file is compressed with gzip which is extremely slow. PDB 1aon with surface takes 56 seconds to save session (file size 160 Mbytes, opens in 2.4s), but 2.9 seconds if saved without the gzip compression (file size 322 Mb, opens in 1.05s).

File size is twice as large without compression but saves 20 times faster, and opens almost 3 times faster. These times are with an SSD drive, and likely the files were in operating system in memory disk cache.

comment:4 by Tom Goddard, 6 years ago

Blosc compression is much faster, so fast (several Gbytes/sec) that it can have minimal impact on speed. There is a blosc PyPi package but there is no wrapper to use it streaming to a file akin to GzipFile which ChimeraX is using.

comment:5 by Tom Goddard, 6 years ago

Resolution: fixed
Status: assignedclosed

I made session save not compress. This gives 20x faster write, 3x faster read, and 2x larger file size which seems like a very worthwhile tradeoff. In the future we could use blosc compression and likely reduce file size 2x.

Note: See TracTickets for help on using tickets.