Open mohamed-barakat opened 4 years ago
I deactivate the Object/MorphismCache of the functor and the NaturalTransformationCache for the transformation:
# for func.
DeactivateCachingObject( ObjectCache( F ) );
DeactivateCachingObject( MorphismCache( F ) );
# for nat.
DeactivateCachingObject( NaturalTransformationCache( eta ) );
I don't think there are a convenience methods for that yet.
Excellent, thank you very much.
Let us turn this issue into a feature request for improving the documentation of the CAP manual in
Section 1.7 Caching
I have now disabled the object/morphism caches for all functors created in FunctorCategories
. I would be grateful if you could test the new behavior of Bialgebroids
and FunctorCategories
. I will add back "custom" object caching to the functors later which should be much faster than the current deactivated one.
It seems that the last commit in functor categories should be adjusted:
Here is timing experiment:
In functor categories package, example beilinson_quiver.g
, let
a := DirectSum( List( [ 1 .. 14 ], i -> Random( indec_projs ) ) );;
b := DirectSum( List( [ 1 .. 14 ], i -> Random( indec_projs ) ) );;
Before deactivating the caching:
B := Time( BasisOfExternalHom, [a,b] );;
#! 32.203597235 Secs.
Size(B);
#! 492
Time( Sum, [B] );
#! 5.403279159 Secs.
After deactivating the caching:
B := Time( BasisOfExternalHom, [a,b] );;
#! 32.473417945 Secs.
Size(B);
#! 492
Time( Sum, [B] );
#! 71.87341444499999 Secs.
Could you please open an issue on FunctorCategories
so we can keep the traffic low here.
How can I disable caching for a functor or a natural transformation?