Speeding up the ocnPrint() function

  • Thread starter Stephen Greenwood
  • Start date
S

Stephen Greenwood

Guest
I discovered that ocnPrint() can be very slow for larger data sets.
Searching the archives of this group turned up this old post:

http://groups.google.com/group/comp.cad.cadence/msg/0bc39506b507edf3

The solutions offered later in that thread may have worked out well,
but I found another one and thought I'd post it for the next person
who searches the archives.

I noticed that ocnPrint() is reasonably fast until the data gets above
a certain size. I don't know what that size is, but one does get a
warning if the printing exceeds 10000 points. To get around this, I
simply embedded the ocnPrint() statement in a for() loop, printing 1%
of the points each time through the loop. The index of the loop is
used to control the ?from and ?to switches. Obviously the 1% is
arbitrary, and can be increased or decreased for smaller or larger
numbers of points, respectively.

In my case, doing all the printing in a single statement took so long
that I just killed it after letting it run for several hours. The
looped version finished executing in under 5 minutes for ~20MB of
data.

Happy printing,
Stephen Greenwood
 
On Jun 1, 6:14 am, Stephen Greenwood <stephen.greenw...@gmail.com>
wrote:
I noticed that ocnPrint() is reasonably fast until the data gets above
a certain size. I don't know what that size is, but one does get a
warning if the printing exceeds 10000 points. To get around this, I
simply embedded the ocnPrint() statement in a for() loop, printing 1%
of the points each time through the loop. The index of the loop is
used to control the ?from and ?to switches. Obviously the 1% is
arbitrary, and can be increased or decreased for smaller or larger
numbers of points, respectively.
Thanks for the input.

How much physical memory does your workstation have? I have always
been thinking that this is the reason for any skill list operation to
start swapping, which kills performance. Maybe ocnPrint uses a list
operation that first expands the whole list, or wants to build the
whole list before printing to disk. We don't know, and will never
know, since we don't have the source code of it....
--
Svenn
 
On Jun 1, 10:36 pm, Svenn Are Bjerkem <svenn.bjer...@googlemail.com>
wrote:
On Jun 1, 6:14 am, Stephen Greenwood <stephen.greenw...@gmail.com
wrote:

I noticed thatocnPrint() is reasonably fast until the data gets above
a certain size. I don't know what that size is, but one does get a
warning if the printing exceeds 10000 points. To get around this, I
simply embedded theocnPrint() statement in a for() loop, printing 1%
of the points each time through the loop. The index of the loop is
used to control the ?from and ?to switches. Obviously the 1% is
arbitrary, and can be increased or decreased for smaller or larger
numbers of points, respectively.

Thanks for the input.

How much physical memory does your workstation have? I have always
been thinking that this is the reason for any skill list operation to
start swapping, which kills performance. MaybeocnPrintuses a list
operation that first expands the whole list, or wants to build the
whole list before printing to disk. We don't know, and will never
know, since we don't have the source code of it....
--
Svenn
Hi Svenn,

Sorry for the late reply. I don't check here too often. I think the
machine I was using at the time had 2GB physical memory, shared with
one other user. Sorry, I don't recall how much memory was being used
at the time. All I remember is that the CPU usage was pegged at ~100%.
Who knows what the limiting mechanism is; no source code, as you say.

Stephen Greenwood
 
On Mon, 18 Jun 2007 17:40:38 -0000, Stephen Greenwood
<stephen.greenwood@gmail.com> wrote:

On Jun 1, 10:36 pm, Svenn Are Bjerkem <svenn.bjer...@googlemail.com
wrote:
On Jun 1, 6:14 am, Stephen Greenwood <stephen.greenw...@gmail.com
wrote:

I noticed thatocnPrint() is reasonably fast until the data gets above
a certain size. I don't know what that size is, but one does get a
warning if the printing exceeds 10000 points. To get around this, I
simply embedded theocnPrint() statement in a for() loop, printing 1%
of the points each time through the loop. The index of the loop is
used to control the ?from and ?to switches. Obviously the 1% is
arbitrary, and can be increased or decreased for smaller or larger
numbers of points, respectively.

Thanks for the input.

How much physical memory does your workstation have? I have always
been thinking that this is the reason for any skill list operation to
start swapping, which kills performance. MaybeocnPrintuses a list
operation that first expands the whole list, or wants to build the
whole list before printing to disk. We don't know, and will never
know, since we don't have the source code of it....
--
Svenn

Hi Svenn,

Sorry for the late reply. I don't check here too often. I think the
machine I was using at the time had 2GB physical memory, shared with
one other user. Sorry, I don't recall how much memory was being used
at the time. All I remember is that the CPU usage was pegged at ~100%.
Who knows what the limiting mechanism is; no source code, as you say.

Stephen Greenwood
ocnPrint will be much faster if you don't specify any ?from ?to or ?step
(or whatever the argument is) and don't play with many of the other formatting
arguments. Otherwise it has to clip the data, or interpolate the values, which
is relatively lengthy.

Regards,

Andrew.
--
Andrew Beckett
Senior Solution Architect
Cadence Design Systems, UK.
 

Welcome to EDABoard.com

Sponsor

Back
Top