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

Too many slocs #507

Open
4 tasks
thomaspeugeot opened this issue Aug 14, 2024 · 0 comments
Open
4 tasks

Too many slocs #507

thomaspeugeot opened this issue Aug 14, 2024 · 0 comments
Assignees

Comments

@thomaspeugeot
Copy link
Contributor

thomaspeugeot commented Aug 14, 2024

musicxsd gong takes eons to compile

...
Function GetPointerReverseMap in file models/gong.go has 779 SLOC (generic)
Function CopyBranch in file models/gong_graph.go has 782 SLOC (generic)
Function OnAfterUpdate in file probe/tree_node_impl_gongstruct.go has 792 SLOC
Function OnSave in file probe/form_callback.go has 862 SLOC
Function AfterCreateFromFront in file models/gong_callbacks.go has 1037 SLOC (generic)
Function AfterReadFromFront in file models/gong_callbacks.go has 1037 SLOC (generic)
Function GetInstanceDBFromInstance in file orm/get_instance_db_from_instance.go has 1041 SLOC (generic)
Function GetAssociationName in file models/gong.go has 1185 SLOC (generic)
Function AfterUpdateFromFront in file models/gong_callbacks.go has 1295 SLOC (generic)
Function AfterDeleteFromFront in file models/gong_callbacks.go has 1295 SLOC (generic)
Function GetIDPointer in file orm/get_instance_db_from_instance.go has 1299 SLOC (generic)
Function GetID in file orm/get_instance_db_from_instance.go has 1299 SLOC (generic)
Function registerControllers in file controllers/register_controllers.go has 1557 SLOC
Function CopyBackRepoToBackRepoData in file orm/back_repo_data.go has 1807 SLOC
Function GetReverseFields in file models/gong.go has 1995 SLOC (generic)
Function NewBackRepo in file orm/back_repo.go has 2092 SLOC
Function fillUpTree in file probe/fill_up_tree.go has 2380 SLOC
Function GetReverseFieldOwner in file orm/get_reverse_field_owner_name.go has 2663 SLOC (generic)
Function FillUpNamedFormFromGongstruct in file probe/fill_up_form_from_gongstruct.go has 3102 SLOC (generic)
Function ComputeReverseMaps in file models/gong_slices.go has 3241 SLOC
Function FillUpFormFromGongstructName in file probe/fill_up_form_from_gongstruct_name.go has 3371 SLOC
Function GetReverseFieldOwnerName in file orm/get_reverse_field_owner_name.go has 3473 SLOC (generic)
Function GetSliceOfPointersReverseMap in file models/gong.go has 4019 SLOC (generic)
Function GetFieldStringValueFromPointer in file models/gong.go has 6463 SLOC (generic)
Function GetFieldStringValue in file models/gong.go has 6463 SLOC (generic)
Function EvictInOtherSlices in file models/gong_slices.go has 7156 SLOC (generic)
Function UnmarshallGongstructStaging in file models/gong_ast.go has 11703 SLOC
Function FillUpForm in file probe/fill_up_form.go has 12430 SLOC (generic)
Function Marshall in file models/gong_marshall.go has 17236 SLOC

Steps:

  • remove EvitInOtherSlices generic function
  • make FillUpForm non generic
  • make GetFieldStringValue and GetFieldStringValue non generic
  • make GetSliceOfPointersReverseMap non generic
@thomaspeugeot thomaspeugeot self-assigned this Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant