Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
  • inkscape inkscape
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 1,524
    • Issues 1,524
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 138
    • Merge requests 138
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Inkscape
  • inkscapeinkscape
  • Issues
  • #1878
Closed
Open
Created Sep 21, 2020 by Thomas Holder@speleo3Developer

Internal PDF import spends forever on ICC color space parsing

Summary:

I have a CorelDraw generated PDF file which takes about 10 seconds to load with "Poppler/Cairo import" method, but takes forever with "Internal import" method. Random interruptions of the process indicate that most of the time is spend for ICC color space parsing. For example:

#0  0x00007ffff54db495 in FlateStream::readSome() () at /usr/lib/libpoppler.so.102
#1  0x00007ffff54db703 in FlateStream::getChars(int, unsigned char*) () at /usr/lib/libpoppler.so.102
#2  0x00007ffff54843b3 in GfxICCBasedColorSpace::parse(Array*, OutputDev*, GfxState*, int) () at /usr/lib/libpoppler.so.102
#3  0x00007ffff5485db8 in GfxColorSpace::parse(GfxResources*, Object*, OutputDev*, GfxState*, int) () at /usr/lib/libpoppler.so.102
#4  0x00007ffff6f2ea8a in PdfParser::opSetFillColorSpace(Object*, int) (this=0x555556bacf40, args=0x7fffffffda90) at ../src/extension/internal/pdfinput/pdf-parser.cpp:1094

There are only 5 color spaces defined in the file, caching the result of GfxColorSpace::parse would fix the problem.

Steps to reproduce:

  • open Inkscape
  • File > Open... > select PDF with many ICC color space references
  • Keep default PDF import settings, in particular "Internal import"
  • Click OK

What happened?

Inkscape freezes

What should have happened?

Import time should be comparable to Poppler/Cairo method.

Inkscape Version and Operating System:

  • Inkscape Version: 1.1-dev (97c5de14bd, 2020-09-20, custom)
  • Operating System: Arch Linux
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking