Bugs item #3048758, was opened at 2010-08-19 16:42
Message generated for change (Tracker Item Submitted) made by baoilleach
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=428740&aid=3048758&group_id=40728
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: File Translation
Group: 2.2.x
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Noel O'Boyle (baoilleach)
Assigned to: Nobody/Anonymous (nobody)
Summary: Gzipped Mol2 format very slow due to use of seekg
Initial Comment:
>From a user:
"I had to comment out the lines below in mol2format.cpp (line 322-) because use
of seekg on a zipped stream is very expensive.
The zlib implementation, I think, just rewinds the file and seeks back to the
specified position (reading and uncompressing as it goes). It's so expensive
that it's much quicker to unzip the file first and then process it. It doesn't
get noticeable until you get a few thousand molecules into the file.
// continue untill EOF or untill next molecule record
/* streampos pos;
for(;;)
{
pos = ifs.tellg();
if (!ifs.getline(buffer,BUFF_SIZE))
break;
if (EQn(buffer,"@<TRIPOS>MOLECULE",17))
break;
}
ifs.seekg(pos); // go back to the end of the molecule
*/
Commenting this out does not cause any problems for me. It will mean that the
stream does not have eof() state set after the last molecule, and that the file
will not be positioned immediately before the @<TRIPOS>MOLECULE line - but
that's not explicitly guaranteed by the OB API anyway - the last Read() will
return false as expected as it hits the end of the file.
I haven't looked to see if this occurs in other formats. Presumably SDF is OK
as it has an end marker for each section, and one line formats (e.g. smiles)
will be OK."
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=428740&aid=3048758&group_id=40728
------------------------------------------------------------------------------
This SF.net email is sponsored by
Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev
_______________________________________________
OpenBabel-Devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbabel-devel