Re: [PATCH 2/3] doc-rst: Delete output of failed dot-SVG conversion
On Sat, 04 Feb 2017 17:18:43 +0100 Ben Hutchingswrote: > I've now tested this, and found that dot still touches the output file > even if it fails. So changing to -o doesn't fix anything. > > Please apply the original patch. That has now been done. Thanks, jon -- To unsubscribe from this list: send the line "unsubscribe linux-doc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/3] doc-rst: Delete output of failed dot-SVG conversion
On Sat, 04 Feb 2017, Ben Hutchingswrote: > On Wed, 2017-02-01 at 13:20 -0700, Jonathan Corbet wrote: >> On Tue, 31 Jan 2017 15:37:50 + >> Ben Hutchings wrote: >> >> > > I'd just use dot -o. >> > >> > That does make more sense. I looked for such an option before >> > writing >> > this, but the manual page doesn't mention it! >> >> Can I get an updated patch from you? Then I'll apply the whole >> set... > > I've now tested this, and found that dot still touches the output file > even if it fails. So changing to -o doesn't fix anything. Ugh. :( > Please apply the original patch. Ack. BR, Jani. -- Jani Nikula, Intel Open Source Technology Center -- To unsubscribe from this list: send the line "unsubscribe linux-doc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/3] doc-rst: Delete output of failed dot-SVG conversion
On Tue, 31 Jan 2017 15:37:50 + Ben Hutchingswrote: > > I'd just use dot -o. > > That does make more sense. I looked for such an option before writing > this, but the manual page doesn't mention it! Can I get an updated patch from you? Then I'll apply the whole set... Thanks, jon -- To unsubscribe from this list: send the line "unsubscribe linux-doc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/3] doc-rst: Delete output of failed dot-SVG conversion
On Tue, 2017-01-31 at 09:36 +0200, Jani Nikula wrote: > On Tue, 31 Jan 2017, Ben Hutchingswrote: > > As we use redirection to create the SVG file, even a failed > > conversion > > will create the file and 'make' will consider it up-to-date if the > > build is retried. We should delete it in case of failure. > > > > Fixes: ec868e4ee2bc ("docs-rst: media: build SVG from graphviz > > files") > > Signed-off-by: Ben Hutchings > > --- > > Documentation/media/Makefile | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/Documentation/media/Makefile > > b/Documentation/media/Makefile > > index 32663602ff25..730d73db7c7a 100644 > > --- a/Documentation/media/Makefile > > +++ b/Documentation/media/Makefile > > @@ -36,7 +36,7 @@ quiet_cmd_genpdf = GENPDF $2 > > cmd_genpdf = convert $2 $3 > > > > quiet_cmd_gendot = DOT $2 > > - cmd_gendot = dot -Tsvg $2 > $3 > > + cmd_gendot = dot -Tsvg $2 > $3 || { rm -f $3; exit 1; } > > I'd just use dot -o. That does make more sense. I looked for such an option before writing this, but the manual page doesn't mention it! Ben. > > > > %.pdf: %.svg > > @$(call cmd,genpdf,$<,$@) > > > > -- Ben Hutchings It is easier to write an incorrect program than to understand a correct one. signature.asc Description: This is a digitally signed message part
Re: [PATCH 2/3] doc-rst: Delete output of failed dot-SVG conversion
Em Tue, 31 Jan 2017 14:00:59 +0100 Markus Heiserescreveu: > Am 31.01.2017 um 11:41 schrieb Mauro Carvalho Chehab : > > > Em Tue, 31 Jan 2017 09:44:10 +0100 > > Markus Heiser escreveu: > > > >> BTW, my 'convert' (ImageMagick) is very slow and CPU consuming: > >> > >> GENPDF Documentation/media/uapi/v4l/selection.svg > >> > >> takes approximately 20% - 30% of the **complete** build time > >> of the 'pdfdocs' target. Its only with 'selection.svg'. The > >> other conversions are fast. > >> > >>Is this only to me? > >> > >> Here is what I have installed ... > >> > >> $ convert -version > >> Version: ImageMagick 6.8.9-9 Q16 x86_64 2016-11-29 > >> http://www.imagemagick.org > >> Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC > >> Features: DPC Modules OpenMP > >> Delegates: bzlib cairo djvu fftw fontconfig freetype jbig jng jpeg lcms > >> lqr ltdl lzma openexr pangocairo png rsvg tiff wmf x xml zlib > > > > Here, it took about 4 seconds to build it (CPU is Xeon(R) CPU E5-2670 0 @ > > 2.60GHz): > > > > $ time convert Documentation/media/uapi/v4l/selection.svg > > Documentation/media/uapi/v4l/selection.pdf > > > > real0m4.818s > > user0m57.714s > > sys 0m0.508s > > > > $ convert -version > > Version: ImageMagick 6.9.3-0 Q16 x86_64 2016-05-14 > > http://www.imagemagick.org > > Copyright: Copyright (C) 1999-2016 ImageMagick Studio LLC > > License: http://www.imagemagick.org/script/license.php > > Features: Cipher DPC Modules OpenMP > > Delegates (built-in): bzlib cairo djvu fftw fontconfig freetype gslib jbig > > jng jp2 jpeg lcms ltdl lzma openexr pangocairo png ps rsvg tiff webp wmf x > > xml zlib > > > > It is not too slow on my desktop with Intel(R) Core(TM) i7-6770HQ CPU @ > > 2.60GHz: > > > > $ time convert Documentation/media/uapi/v4l/selection.svg > > Documentation/media/uapi/v4l/selection.pdf > > > > real0m12.485s > > user0m53.602s > > sys 0m0.340s > > > > Hi Mauro! > > I don't want to made a hardware competition, which I will lose ;) Well, my Xeon machine has already 3 years old. I'm about to receive a new hardware, as it is too slow for my current needs ;) > I like to ride my good old steam-engines ... so lets face a single PDF > conversion with a full HTML build: > > $ time convert Documentation/media/uapi/v4l/selection.svg > Documentation/media/uapi/v4l/selection.pdf > > real 3m5.715s > user 3m3.224s > sys 0m2.252s > > compared with a full HTML build:: > > $ time make DOCBOOKS= htmldocs > > real 3m37.134s > user 3m22.840s > sys 0m9.408s > > both consume nearly the same time and resources. You're comparing oranges with apples. Building for pdf targets spend a lot more time than html builds. The selection.pdf is only generated for PDF output. Yet, on my i7core, it takes twice the time (without SPHINXOPTS="-j"): $ make cleandocs; time make DOCBOOKS= htmldocs SKIPDocBook htmldocs target (DOCBOOKS="" specified). real5m54.326s user5m40.145s sys 0m12.322s With parallel, build, it reduces to about the same time as your build: $ make cleandocs; time make SPHINXOPTS="-j4" DOCBOOKS= htmldocs real2m27.688s user6m4.690s sys 0m19.251s > > This image is complex, as it has two tux images, where one of them > > is cropped. > > Sorry for bikesheeding you, is there a chance to get a less complex SVG? It used to be a simple bitmap image, but, as it was requested to convert all images to svg format, I just took a nice image that was part of the Kernel tree for a while, and used it as reference. The base image[1] was added on this Kernel commit: 8032b526d1a3 ("linux.conf.au 2009: Tuz") [1] It was added as the mascot of the 2009 linux.conf.au conference. See https://en.wikipedia.org/wiki/Tux#Tuz_2009 I used is as a basis because: 1) as it was merged already at the Kernel, there won't be any license/copyright issues on re-adding it; 2) It has a cause behind it: to support the effort to save the Tasmanian devil species from extinction due to the devil facial tumour disease; 3) It is an image already associated with the Kernel; 4) It is fun ;) I don't really mind if some other vectorial image would be used instead, but, IMHO, it should be some other vectorial image of Tux with some license allowing it to be shipped with the Kernel. Thanks, Mauro -- To unsubscribe from this list: send the line "unsubscribe linux-doc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/3] doc-rst: Delete output of failed dot-SVG conversion
Am 31.01.2017 um 11:41 schrieb Mauro Carvalho Chehab: > Em Tue, 31 Jan 2017 09:44:10 +0100 > Markus Heiser escreveu: > >> BTW, my 'convert' (ImageMagick) is very slow and CPU consuming: >> >> GENPDF Documentation/media/uapi/v4l/selection.svg >> >> takes approximately 20% - 30% of the **complete** build time >> of the 'pdfdocs' target. Its only with 'selection.svg'. The >> other conversions are fast. >> >>Is this only to me? >> >> Here is what I have installed ... >> >> $ convert -version >> Version: ImageMagick 6.8.9-9 Q16 x86_64 2016-11-29 http://www.imagemagick.org >> Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC >> Features: DPC Modules OpenMP >> Delegates: bzlib cairo djvu fftw fontconfig freetype jbig jng jpeg lcms lqr >> ltdl lzma openexr pangocairo png rsvg tiff wmf x xml zlib > > Here, it took about 4 seconds to build it (CPU is Xeon(R) CPU E5-2670 0 @ > 2.60GHz): > > $ time convert Documentation/media/uapi/v4l/selection.svg > Documentation/media/uapi/v4l/selection.pdf > > real 0m4.818s > user 0m57.714s > sys 0m0.508s > > $ convert -version > Version: ImageMagick 6.9.3-0 Q16 x86_64 2016-05-14 http://www.imagemagick.org > Copyright: Copyright (C) 1999-2016 ImageMagick Studio LLC > License: http://www.imagemagick.org/script/license.php > Features: Cipher DPC Modules OpenMP > Delegates (built-in): bzlib cairo djvu fftw fontconfig freetype gslib jbig > jng jp2 jpeg lcms ltdl lzma openexr pangocairo png ps rsvg tiff webp wmf x > xml zlib > > It is not too slow on my desktop with Intel(R) Core(TM) i7-6770HQ CPU @ > 2.60GHz: > > $ time convert Documentation/media/uapi/v4l/selection.svg > Documentation/media/uapi/v4l/selection.pdf > > real 0m12.485s > user 0m53.602s > sys 0m0.340s > Hi Mauro! I don't want to made a hardware competition, which I will lose ;) I like to ride my good old steam-engines ... so lets face a single PDF conversion with a full HTML build: $ time convert Documentation/media/uapi/v4l/selection.svg Documentation/media/uapi/v4l/selection.pdf real3m5.715s user3m3.224s sys 0m2.252s compared with a full HTML build:: $ time make DOCBOOKS= htmldocs real3m37.134s user3m22.840s sys 0m9.408s both consume nearly the same time and resources. > This image is complex, as it has two tux images, where one of them > is cropped. Sorry for bikesheeding you, is there a chance to get a less complex SVG? -- Markus -- -- To unsubscribe from this list: send the line "unsubscribe linux-doc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/3] doc-rst: Delete output of failed dot-SVG conversion
Em Tue, 31 Jan 2017 09:44:10 +0100 Markus Heiserescreveu: > BTW, my 'convert' (ImageMagick) is very slow and CPU consuming: > >GENPDF Documentation/media/uapi/v4l/selection.svg > > takes approximately 20% - 30% of the **complete** build time > of the 'pdfdocs' target. Its only with 'selection.svg'. The > other conversions are fast. > > Is this only to me? > > Here is what I have installed ... > > $ convert -version > Version: ImageMagick 6.8.9-9 Q16 x86_64 2016-11-29 http://www.imagemagick.org > Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC > Features: DPC Modules OpenMP > Delegates: bzlib cairo djvu fftw fontconfig freetype jbig jng jpeg lcms lqr > ltdl lzma openexr pangocairo png rsvg tiff wmf x xml zlib Here, it took about 4 seconds to build it (CPU is Xeon(R) CPU E5-2670 0 @ 2.60GHz): $ time convert Documentation/media/uapi/v4l/selection.svg Documentation/media/uapi/v4l/selection.pdf real0m4.818s user0m57.714s sys 0m0.508s $ convert -version Version: ImageMagick 6.9.3-0 Q16 x86_64 2016-05-14 http://www.imagemagick.org Copyright: Copyright (C) 1999-2016 ImageMagick Studio LLC License: http://www.imagemagick.org/script/license.php Features: Cipher DPC Modules OpenMP Delegates (built-in): bzlib cairo djvu fftw fontconfig freetype gslib jbig jng jp2 jpeg lcms ltdl lzma openexr pangocairo png ps rsvg tiff webp wmf x xml zlib It is not too slow on my desktop with Intel(R) Core(TM) i7-6770HQ CPU @ 2.60GHz: $ time convert Documentation/media/uapi/v4l/selection.svg Documentation/media/uapi/v4l/selection.pdf real0m12.485s user0m53.602s sys 0m0.340s This image is complex, as it has two tux images, where one of them is cropped. Thanks, Mauro -- To unsubscribe from this list: send the line "unsubscribe linux-doc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/3] doc-rst: Delete output of failed dot-SVG conversion
On Tue, 31 Jan 2017, Ben Hutchingswrote: > As we use redirection to create the SVG file, even a failed conversion > will create the file and 'make' will consider it up-to-date if the > build is retried. We should delete it in case of failure. > > Fixes: ec868e4ee2bc ("docs-rst: media: build SVG from graphviz files") > Signed-off-by: Ben Hutchings > --- > Documentation/media/Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/Documentation/media/Makefile b/Documentation/media/Makefile > index 32663602ff25..730d73db7c7a 100644 > --- a/Documentation/media/Makefile > +++ b/Documentation/media/Makefile > @@ -36,7 +36,7 @@ quiet_cmd_genpdf = GENPDF $2 >cmd_genpdf = convert $2 $3 > > quiet_cmd_gendot = DOT $2 > - cmd_gendot = dot -Tsvg $2 > $3 > + cmd_gendot = dot -Tsvg $2 > $3 || { rm -f $3; exit 1; } I'd just use dot -o. > > %.pdf: %.svg > @$(call cmd,genpdf,$<,$@) > -- Jani Nikula, Intel Open Source Technology Center -- To unsubscribe from this list: send the line "unsubscribe linux-doc" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html