On Wednesday, April 29, 2015 at 1:11:22 AM UTC-7, jplab wrote:
>
> Hi,
>
> I had not noticed that Polyhedron created a Poset, and if so that 'makes 
>> sense'. I had the same problem with both classes: it makes it very hard to 
>> create a lot of Polyhedron objects, or many posets (and this, in turns, 
>> makes it hard to write a routine that enumerates posets up to isomorphism) 
>> :-/
>>
>
> Yes, this is really bad. At the time, I had to create loads of relatively 
> small polyhedral cones and discard them but the computation was hitting the 
> RAM limit way too fast.
>
> Is the related poset problem really difficult to fix?
>
> As is pointed out on #14356, the solution is to have a lighter weight 
PoSet. The analysis there indicates that the memory leaks happens via the 
UniqueRepresentation cache. Parents only need to be UniqueRepresentation if 
they need to participate seriously in the coercion framework, which I 
suspect isn't so interesting for Posets it general. So if this problem 
keeps creeping up, someone should bite the bullet and implement non-unique 
representation posets and use those (in nearly all situations?)
 

> I believe that trying to have a workaround for polyhedron to avoid the 
> usage of the face lattice is
>
> 1) a lot of work
> 2) not clear how fast it could be
>

Instantiating parents is inherently expensive. If you're concerned with 
speed and you make a lot of posets, make sure that the object representing 
those posets is lightweight, so not a "parent".

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to