Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change registration of SpaceGroups into Factory #11346

Closed
MichaelWedel opened this issue Nov 5, 2014 · 1 comment
Closed

Change registration of SpaceGroups into Factory #11346

MichaelWedel opened this issue Nov 5, 2014 · 1 comment
Assignees
Labels
Framework Issues and pull requests related to components in the Framework
Milestone

Comments

@MichaelWedel
Copy link
Contributor

This ticket is blocks : TRAC10344

The conclusion of a discussion about the growing number of factories in MantidGeometry was that this may lead to longer loading times when Mantid is launched, especially if registering objects requires a considerable amount of work.

  • In the case of BraggScattererFactory there are only two registered classes and registering them does not require doing much (it's using Kernel::DynamicFactory).
  • For PointGroup, the number of registered objects is small (13) and is ultimately limited to 32. Additionally, PointGroup may change in the not so far future (derive it from the Group-hierarchy, like SpaceGroup).
  • SpaceGroupFactory is an issue, because there are hundreds of possible space groups that can be registered and currently a prototype is created when the class is registered - this is computationally expensive in high symmetry cases.

I want to change the way space groups are subscribed to the factory, postponing the creation of the prototype until a concrete group is requested. The first creation of a space group will then be slower compared to now, but a lot of potentially unnecessary work (if space groups are not used) is avoided on launching.

I would like to do this before http://trac.mantidproject.org/mantid/ticket/10344, where I plan to add many space groups.

@MichaelWedel
Copy link
Contributor Author

This issue was originally trac ticket 10504

@MichaelWedel MichaelWedel added the Framework Issues and pull requests related to components in the Framework label Jun 3, 2015
@MichaelWedel MichaelWedel self-assigned this Jun 3, 2015
@MichaelWedel MichaelWedel added this to the Release 3.3 milestone Jun 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Framework Issues and pull requests related to components in the Framework
Projects
None yet
Development

No branches or pull requests

1 participant