[[TOC]]
The examples below are for the 2.44.1 release. Modify the version number for the actual release.
The instructions below can be used from a fork (recommended) or from a clone of the master repo.
This project adheres to Semantic Versioning. Before making the release, it must be decided if it is a major, minor or patch release.
See gen-version.py.
-
Check that the master pipeline is green
-
Create a local branch and name it e.g.
stable-release-<version>Example:
stable-release-2.44.1 -
Edit
gen_version.pyaccording to instructions in that file. -
Edit
CHANGELOG.mdAdd the new version between
[Unreleased]and the previous version.At the bottom of the file, add an entry for the new version. These entries are not visible in the rendered page, but are essential for the version links to the GitLab commit comparisons to work.
Example (from https://gitlab.com/graphviz/graphviz/-/commit/5e0d3b1841b7e358274c916b52276d251eabef3d#ab09011fa121d0a2bb9fa4ca76094f2482b902b7):
## [Unreleased] +## [2.44.1] - 2020-06-29 +
-[Unreleased]: https://gitlab.com/graphviz/graphviz/compare/2.44.0...master +[Unreleased]: https://gitlab.com/graphviz/graphviz/compare/2.44.1...master +[2.44.1]: https://gitlab.com/graphviz/graphviz/compare/2.44.0...2.44.1 [2.44.0]: https://gitlab.com/graphviz/graphviz/compare/2.42.4...2.44.0 [2.42.4]: https://gitlab.com/graphviz/graphviz/compare/2.42.3...2.42.4 [2.42.3]: https://gitlab.com/graphviz/graphviz/compare/2.42.2...2.42.3
-
Commit:
git add -pgit commit -m "Stable Release 2.44.1" -
Push:
Example:
git push origin stable-release-2.44.1 -
Wait until the pipeline has run for your branch and check that it's green
-
Create a merge request
-
Merge the merge request
-
Wait for the master pipeline to run for the new commit and check that it's green
-
Create a release at GitHub releases
Fill in the
Tag name,MessageandRelease notesfields. TheTag nameshall be a pure numeric new tag on the form<major>.<minor>.<patch>. TheMessagefield shall have the textStable Release <major>.<minor>.<patch>. TheRelease Notesfield shall have the textSee the [CHANGELOG.md](<link to version in CHANGELOG.md>).Example:
- Tag name:
2.44.1 - Message:
Stable Release 2.44.1 - Release notes:
See the [CHANGELOG](https://gitlab.com/graphviz/graphviz/-/blob/master/CHANGELOG.md#2441-2020-06-29).
- Tag name:
-
Create a new local branch and name it e.g.
return-to-<version>-devExample:
return-to-2.45-dev -
Edit
gen_version.pyagain according to instructions in that file. -
Commit:
git add -pIf patch version was incremented:
Example:
git commit -m "Move back to 2.45 development series"else (if major or minor version was incremented):
Example:
git commit -m "Start 2.47 development series" -
Push:
Example:
git push origin return-to-2.45-dev -
Wait until the pipeline has run for your new branch and check that it's green
-
Create a merge request
-
Merge the merge request
The runtime and memory usage of Graphviz is dependent on the user’s graph. It is easy to create “expensive” graphs without realizing it using only moderately sized input. For this reason, users regularly encounter performance bottlenecks that they need help with. This situation is likely to persist even with hardware advances, as the size and complexity of the graphs users construct will expand as well.
This section documents how to build performance-optimized Graphviz binaries and how to identify performance bottlenecks. Note that this information assumes you are working in a Linux environment.
The first step to getting an optimized build is to make sure you are using a recent compiler. If you have not upgraded your C and C++ compilers for a while, make sure you do this first.
The simplest way to change flags used during compilation is by setting the
CFLAGS and CXXFLAGS environment variables:
env CFLAGS="..." CXXFLAGS="..." ./configureYou should use the maximum optimization level for your compiler. E.g. -O3 for
GCC and Clang. If your toolchain supports it, it is recommended to also enable
link-time optimization (-flto).
You can further optimize compilation for the machine you are building on with
-march=native -mtune=native. Be aware that the resulting binaries will no
longer be portable (may not run if copied to another machine). These flags are
also not recommended if you are debugging a user issue, because you will end up
profiling and optimizing different code than what may execute on their machine.
Most profilers need a symbol table and/or debugging metadata to give you useful
feedback. You can enable this on GCC and Clang with -g.
Putting this all together:
env CFLAGS="-O3 -flto -march=native -mtune=native -g" \
CXXFLAGS="-O3 -flto -march=native -mtune=native -g" ./configureCallgrind is a tool of Valgrind that can measure how many times a function is called and how expensive the execution of a function is compared to overall runtime. When you have built an optimized binary according to the above instructions, you can run it under Callgrind:
valgrind --tool=callgrind dot -Tsvg test.dotThis will produce a file like callgrind.out.2534 in the current directory. You can use Kcachegrind to view the results by running it in the same directory with no arguments:
kcachegrindIf you have multiple trace results in the current directory, Kcachegrind will load all of them and even let you compare them to each other. See the Kcachegrind documentation for more information about how to use this tool.
Be aware that execution under Callgrind will be a lot slower than a normal run.
If you need to see instruction-level execution costs, you can pass
--dump-instr=yes to Valgrind, but this will further slow execution and is
usually not necessary. To profile with less overhead, you can use a statistical
profiler like Linux Perf.
TODO
- Update with new example commits after next stable release.
This guide uses GitLab Flavored Markdown (GFM).
This guide can be rendered locally with e.g. Pandoc:
pandoc DEVELOPERS.md --from=gfm -t html -o DEVELOPERS.html
markdownlint-cli can be used to lint it.