This is slow:
gap> LowIndexSubgroups(SL(2,5), 50);; time;
3207
But converting the matrix group to a permutation group is much faster.
gap> LowIndexSubgroups(NiceObject(SL(2,5)), 50);; time;
39
My guess is that some or several operations invoked by LowIndexSubgroups resort to a very slow fallback (like, something doing enumeration or whatever). Of course we could try to install a "nice monomorphism method" for LowIndexSubgroups (and this is probably optimal for now, until we have composition trees for matrix groups properly). But it would also be nice what are the intermediate operations that are causing the slowness, In other words: ideally someone would run a profiler to figure that out, and then we tweak some more methods.
(In general I wonder if we should add a global flag which disables all "fully generic fallbacks" which do things like enumeration -- I would prefer to see an error in those cases, so I can identify "missing" functions. I am not proposing this to be the new default, just as a feature for pro users to help them debug performance issues).
This is slow:
But converting the matrix group to a permutation group is much faster.
My guess is that some or several operations invoked by
LowIndexSubgroupsresort to a very slow fallback (like, something doing enumeration or whatever). Of course we could try to install a "nice monomorphism method" forLowIndexSubgroups(and this is probably optimal for now, until we have composition trees for matrix groups properly). But it would also be nice what are the intermediate operations that are causing the slowness, In other words: ideally someone would run a profiler to figure that out, and then we tweak some more methods.(In general I wonder if we should add a global flag which disables all "fully generic fallbacks" which do things like enumeration -- I would prefer to see an error in those cases, so I can identify "missing" functions. I am not proposing this to be the new default, just as a feature for pro users to help them debug performance issues).