← Back to team overview

dolfin team mailing list archive

Re: [Bug 612579] Re: Huge performance problem in Python interface

 

On Thu, Aug 05, 2010 at 03:48:37PM -0000, Johan Hake wrote:
> I fixed caching of the swig version, which decreased the difference to
> 15 (still quite large). If ufl.algorithm.preprocess is called on the
> form before throwing it into assemble the difference is decreased to
> 2.5.
>
> Is there any way to turn a form that is assembled into a preprocessed
> form Anders? Another way to get around this is to allow a user to give a
> dolfin.Form to assemble. Not sure this is what we want as it clutter the
> interface.

A form must be preprocessed before it is assembled (will happen
somewhere along the way) so it should be possible to always have the
preprocessed form for an assembled form, but perhaps that's not the
problem (see earlier post regarding the 3-level caching).

--
Anders

-- 
Huge performance problem in Python interface
https://bugs.launchpad.net/bugs/612579
You received this bug notification because you are a member of DOLFIN
Team, which is subscribed to DOLFIN.

Status in DOLFIN: Confirmed

Bug description:
In my Python Code I need to evaluate a nonlinear functional many times. This was rather slow and after a profile run, I've noticed that 90% of the time was spent in the __init__ routine of form.py to compile the form. As far as I can survey the code, this should be necessary only once. 

I have attached a simple example that illustrates the effect. In my test, the second code is roughly 40 times faster.





References