Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • graph-tool graph-tool
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 49
    • Issues 49
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Tiago Peixoto
  • graph-toolgraph-tool
  • Merge requests
  • !59

Make most non-class functions static

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Alex Henrie requested to merge alex.henrie/graph-tool:static into master Feb 04, 2021
  • Overview 2
  • Commits 3
  • Pipelines 6
  • Changes 170

These changes decrease the total size of the graph-tool libraries by 1.4 MB.

Before:

$ du -h `find -name *.so` | sort -h
20K     ./src/graph/draw/.libs/libgt_pycairo_aux.so
1.4M    ./src/graph/util/.libs/libgraph_tool_util.so
2.0M    ./src/graph/clustering/.libs/libgraph_tool_clustering.so
2.4M    ./src/graph/stats/.libs/libgraph_tool_stats.so
6.2M    ./src/graph/draw/.libs/libgraph_tool_draw.so
9.1M    ./src/graph/flow/.libs/libgraph_tool_flow.so
13M     ./src/graph/centrality/.libs/libgraph_tool_centrality.so
13M     ./src/graph/dynamics/.libs/libgraph_tool_dynamics.so
18M     ./src/graph/layout/.libs/libgraph_tool_layout.so
18M     ./src/graph/spectral/.libs/libgraph_tool_spectral.so
25M     ./src/graph/search/.libs/libgraph_tool_search.so
29M     ./src/graph/generation/.libs/libgraph_tool_generation.so
42M     ./src/graph/correlations/.libs/libgraph_tool_correlations.so
60M     ./src/graph/.libs/libgraph_tool_core.so
70M     ./src/graph/topology/.libs/libgraph_tool_topology.so
372M    ./src/graph/inference/.libs/libgraph_tool_inference.so

After:

$ du -h `find -name *.so` | sort -h
20K     ./src/graph/draw/.libs/libgt_pycairo_aux.so
1.4M    ./src/graph/util/.libs/libgraph_tool_util.so
1.8M    ./src/graph/clustering/.libs/libgraph_tool_clustering.so
2.3M    ./src/graph/stats/.libs/libgraph_tool_stats.so
6.1M    ./src/graph/draw/.libs/libgraph_tool_draw.so
9.1M    ./src/graph/flow/.libs/libgraph_tool_flow.so
13M     ./src/graph/centrality/.libs/libgraph_tool_centrality.so
13M     ./src/graph/dynamics/.libs/libgraph_tool_dynamics.so
17M     ./src/graph/spectral/.libs/libgraph_tool_spectral.so
18M     ./src/graph/layout/.libs/libgraph_tool_layout.so
25M     ./src/graph/search/.libs/libgraph_tool_search.so
29M     ./src/graph/generation/.libs/libgraph_tool_generation.so
42M     ./src/graph/correlations/.libs/libgraph_tool_correlations.so
60M     ./src/graph/.libs/libgraph_tool_core.so
70M     ./src/graph/topology/.libs/libgraph_tool_topology.so
372M    ./src/graph/inference/.libs/libgraph_tool_inference.so

I refrained from making any functions static that might be referenced in multiple compilation units.

Edited Feb 05, 2021 by Alex Henrie
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: static