Memory leak on inkscape stable when registering fonts with pango

Bug #1388148 reported by Andre Barros on 2014-10-31
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Undecided
Unassigned

Bug Description

For some reason the memory is not freed as it, probably, should be in accordance to pango developer page.

I'm submitting two patches: one for this and another one for fonts filtering by both whitelist and blacklist.

On my system, openSUSE, I have TeX installed and the difference on inkscape loading is sensible with the patches.

Also, I am not sure, but the first patch seems to fix a problem I had, i.e., slowing down after many inkscape restarting. Perhaps, it was related to the leak.

Andre Barros (andrecbarros) wrote :
Andre Barros (andrecbarros) wrote :

One last advice, the second patch was created with only unix/linux in mind. It needs some adjustments to work with windows on, at least 2 points:
1) because windows use \r\n
- if (pos[-1] == '\n' && pos[i] == '\n')
+ if (iscntrl (pos[-1]) && iscntrl (pos[i]))

2) because I am not aware of how inkscape looks for files on windows
- char * home_dir = getenv ("HOME");
- const char * user_config_dir = "/.config/inkscape/",
+ char * home_dir = ".\\";
+ const char * user_config_dir = "\\where is inkscape config\\",

su_v (suv-lp) wrote :

Thank you very much for investigating font-related issues in Inkscape and contributing patches! Unfortunately, the release branch for current stable Inkscape 0.48.x is a rather dated code base (branched from the development branch in August 2010). There are no new bug-fix releases planned after 0.48.5 based on that branch, nor are new features (e.g. black-white listing of fonts) added there. The project is currently working on getting a new major release ready (0.91) [1], with feature and string freeze in the new release branch already in place, too.

1) Any chance you could investigate (is it still required) and adjust the mem-leak patch (one junk doesn't apply in trunk) based on the current development branch (for 0.92)?
<https://code.launchpad.net/~inkscape.dev/inkscape/trunk>

2) Please file a second report for the feature enhancement ('Filter against font whitelist and blacklist). Tracking progress of separate issues in a single bug report is cumbersome, and often results in reports which can never be really closed, or issues forgotten once one of others is resolved.

--
[1] https://inkscape.org/en/develop/next-release/

tags: added: fonts performance
su_v (suv-lp) wrote :

On 2014-10-31 16:41 (+0100), Andre Barros wrote:
> Also, I am not sure, but the first patch seems to fix a problem I had,
> i.e., slowing down after many inkscape restarting. Perhaps, it was
> related to the leak.

I would recommend to test a current trunk build - recent changes wrt font handling on load committed in trunk have hugely improved launch time.

Dave Crossland (davelab6) wrote :

I'm curious, who did the recent changes for font handling, and will they be at LGM? :)

su_v (suv-lp) wrote :

<off-topic>
On 2015-03-06 11:29 (+0100), Dave Crossland wrote:
> I'm curious, who did the recent changes for font handling, and will they
> be at LGM? :)

Liam P. White and Tavmjong Bah improved launch times with many fonts installed. AFAIK Tav will be in Toronto for the hackfest and for LGM 2015, Liam P. White will attend neither of the two events.

See also:
https://bugs.launchpad.net/inkscape/+bug/488247
https://bugs.launchpad.net/inkscape/+bug/488247/comments/47
https://bugs.launchpad.net/inkscape/+bug/1356192

http://wiki.inkscape.org/wiki/index.php/Hackfest2015_Attendees
</off-topic>

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers