sgsellan / gpytoolbox

A collection of utility functions to prototype geometry processing research in python
https://gpytoolbox.org
GNU General Public License v3.0
196 stars 16 forks source link

[do not merge] debugging why actions take so long #123

Closed sgsellan closed 3 months ago

sgsellan commented 4 months ago

Here's a list of offending tests (on MacOS):

817.56s call     test/test_reach_for_the_arcs.py::TestReachForTheArcs::test_simple_is_sdf_violated
371.88s call     test/test_reach_for_the_arcs.py::TestReachForTheArcs::test_beat_marching_cubes_low_res
156.75s call     test/test_stochastic_poisson_surface_reconstruction.py::TestStochasticPoissonSurfaceReconstruction::test_3d
151.35s call     test/test_reach_for_the_arcs.py::TestReachForTheArcs::test_noop
92.23s call     test/test_remesh_botsch.py::TestRemeshBotsch::test_chair_example
90.86s call     test/test_metropolis_hastings.py::TestMetropolisHastings::test_analytic_2d
81.76s call     test/test_squared_distance_to_element.py::TestSquaredDistanceToElement::test_random_triangle
67.34s call     test/test_approximate_hausdorff_distance.py::TestApproximateHausdorffDistance::test_bunny
64.50s call     test/test_upper_envelope.py::TestUpperEnvelope::test_no_inversions
62.35s call     test/test_metropolis_hastings.py::TestMetropolisHastings::test_analytic_1d
57.64s call     test/test_squared_distance.py::TestSquaredDistance::test_meshes
55.17s call     test/test_edge_edge_distance.py::TestEdgeEdgeDistance::test_consistency_meshes
48.28s call     test/test_decimate.py::TestDecimate::test_armadillo
45.89s call     test/test_compactly_supported_normal_kernel.py::TestCompactlySupportedNormalKernel::test_2d
41.05s call     test/test_subdivide.py::TestSubdivide::test_meshes
39.43s call     test/test_marching_cubes.py::TestMarchingCubes::test_meshes
35.98s call     test/test_reach_for_the_spheres.py::TestReachForTheSpheres::test_beat_marching_cubes_low_res
28.70s call     test/test_point_cloud_to_mesh.py::TestPointCloudToMesh::test_variety_of_meshes
25.39s call     test/test_write_mesh.py::TestWriteMesh::test_ply_read_then_write
24.64s call     test/test_swept_volume.py::TestSweptVolume::test_cube
23.46s call     test/test_lazy_cage.py::TestLazyCage::test_armadillo
23.20s call     test/test_offset_surface.py::TestOffsetSurface::test_armadillo
22.52s call     test/test_lazy_cage.py::TestLazyCage::test_bunny
20.96s call     test/test_approximate_hausdorff_distance.py::TestApproximateHausdorffDistance::test_bunny_smaller
20.75s call     test/test_array_correspondence.py::TestArrayCorrespondence::test_random_matrices
17.05s call     test/test_minimum_distance.py::TestMinimumDistance::test_bunny_faces
16.92s call     test/test_read_mesh.py::TestReadMesh::test_ply_read_then_write
16.90s call     test/test_quadtree_gradient.py::TestQuadtreeGradient::test_convergence
16.87s call     test/test_halfedge_edge_map.py::TestHalfedgeEdgeMap::test_variety_of_meshes
16.06s call     test/test_quadtree_laplacian.py::TestQuadtreeLaplacian::test_laplacian_convergence
11.28s call     test/test_triangle_triangle_distance.py::TestTriangleTriangleDistance::test_consistency_meshes
10.66s call     test/test_fd_grad.py::TestFdGrad::test_convergence_3d
10.46s call     test/test_regular_cube_mesh.py::TestRegularCubeMesh::test_reflectionally_symmetric
10.05s call     test/test_reach_for_the_spheres.py::TestReachForTheSpheres::test_simple_is_sdf_violated
9.64s call     test/test_bad_quad_mesh_from_quadtree.py::TestBadQuadMeshFromQuadtree::test_3d_octtree_mesh
9.29s call     test/test_regular_cube_mesh.py::TestRegularCubeMesh::test_six_tets
8.35s call     test/test_regular_cube_mesh.py::TestRegularCubeMesh::test_five_tets
8.07s call     test/test_squared_distance.py::TestSquaredDistance::test_polygon_from_image
7.83s call     test/test_bad_quad_mesh_from_quadtree.py::TestBadQuadMeshFromQuadtree::test_2d_quadtree_mesh
7.35s call     test/test_compactly_supported_normal.py::TestCompactlySupportedNormal::test_2d
7.21s call     test/test_fd_partial_derivative.py::TestFdPartialDerivative::test_convergence_3d
6.84s call     test/test_reach_for_the_spheres.py::TestReachForTheSpheres::test_singularity
6.38s call     test/test_fd_grad.py::TestFdGrad::test_convergence_2d
6.38s call     test/test_ray_mesh_intersect.py::TestRayMeshIntersect::test_embree_vs_no_embree
6.36s call     test/test_initialize_quadtree.py::TestInitializeQuadtree::test_consistency
6.04s call     test/test_remesh_botsch.py::TestRemeshBotsch::test_with_unique_features_closed
5.54s call     test/test_remesh_botsch.py::TestRemeshBotsch::test_bunny
5.33s call     test/test_write_mesh.py::TestWriteMesh::test_obj_read_then_write
5.33s call     test/test_triangle_triangle_adjacency.py::TestTriangleTriangleAdjacency::test_variety_of_meshes
4.81s call     test/test_signed_distance.py::TestSignedDistance::test_sign_bunny
4.53s call     test/test_reach_for_the_spheres.py::TestReachForTheSpheres::test_segfault
4.44s call     test/test_remesh_botsch.py::TestRemeshBotsch::test_with_not_unique_features_and_boundary
4.43s call     test/test_array_correspondence.py::TestArrayCorrespondence::test_random_arrays
4.31s call     test/test_remesh_botsch.py::TestRemeshBotsch::test_with_not_unique_features
4.26s call     test/test_remesh_botsch.py::TestRemeshBotsch::test_with_unique_features
4.09s call     test/test_fd_partial_derivative.py::TestFdPartialDerivative::test_convergence_2d
3.91s call     test/test_write_mesh.py::TestWriteMesh::test_obj_default_Ft_Fn
3.47s call     test/test_signed_distance.py::TestSignedDistance::test_meshes_magnitude
3.39s call     test/test_dec_h1.py::TestDecH1::test_equivalence_to_cotangent_laplacian
2.92s call     test/test_squared_exponential_kernel.py::TestSquaredExponentialKernel::test_2d
2.73s call     test/test_swept_volume.py::TestSweptVolume::test_with_scale
2.67s call     test/test_read_mesh.py::TestReadMesh::test_meshes
2.31s call     test/test_subdivide_quad.py::TestSubdivideQuad::test_consistency
2.26s call     test/test_ray_triangle_intersect.py::TestRayTriangleIntersect::test_against_embree
2.16s call     test/test_biharmonic_energy.py::TestBiharmonicEnergy::test_kernel
2.15s call     test/test_quadtree_boundary.py::TestQuadtreeBoundary::test_is_boundary
2.12s call     test/test_decimate.py::TestDecimate::test_with_boundary
2.09s call     test/test_quadtree_boundary.py::TestQuadtreeBoundary::test_is_child
1.86s call     test/test_offset_surface.py::TestOffsetSurface::test_bunny
1.52s call     test/test_quadtree_children.py::TestQuadtreeChildren::test_are_children
1.49s call     test/test_colormap.py::TestColormap::test_colormaps
1.48s call     test/test_particle_swarm.py::TestParticleSwarm::test_1d_swarm_ring
1.42s call     test/test_quadtree_gradient.py::TestQuadtreeGradient::test_error_is_low
1.40s call     test/test_particle_swarm.py::TestParticleSwarm::test_2d_dropwave
1.32s call     test/test_initialize_aabbtree.py::TestInitializeAabbTree::test_consistency_2d
1.30s call     test/test_stochastic_poisson_surface_reconstruction.py::TestStochasticPoissonSurfaceReconstruction::test_indicator
1.26s call     test/test_rotation_matrix_from_vectors.py::TestRotationMatrixFromVectors::test_randomly_generated_3d
1.26s call     test/test_squared_distance.py::TestSquaredDistance::test_find_closest_point_2d_pointcloud
1.25s call     test/test_barycentric_coordinates.py::TestBarycentricCoordinates::test_random_3d_triangles
1.22s call     test/test_squared_distance.py::TestSquaredDistance::test_find_closest_point_3d_pointcloud
1.21s call     test/test_apply_colormap.py::TestApplyColormap::test_apply_colormaps
1.21s call     test/test_rotation_matrix_from_vectors.py::TestRotationMatrixFromVectors::test_randomly_generated_2d
1.20s call     test/test_initialize_aabbtree.py::TestInitializeAabbTree::test_consistency_3d
1.16s call     test/test_in_quadtree.py::TestQuadtreeBoundary::test_synthetic
1.15s call     test/test_winding_number.py::TestWindingNumber::test_synthetic
1.14s call     test/test_particle_swarm.py::TestParticleSwarm::test_2d_swarm
1.09s call     test/test_png2poly.py::TestPng2Poly::test_simple_pngs
1.09s call     test/test_traverse_aabbtree.py::TestTraverseAabbTree::test_find_closest_point_2d
1.00s call     test/test_barycenters.py::TestBarycenters::test_2d
sgsellan commented 4 months ago

I propose we use this PR to try to reduce these tests to reasonable timing (ideally under 10 seconds each), and push changes one at a time