Closed Bug 468576 Opened 16 years ago Closed 15 years ago

Strip out dead code from mozilla lcms copy

Categories

(Core :: Graphics: Color Management, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 481926

People

(Reporter: bholley, Assigned: bholley)

Details

Attachments

(3 files)

This bug is meant to start discussion on the possible stripping of unused code from mozilla's copy of lcms.

Up until now, we've tried to keep the delta between our copy and upstream as close as possible for the usual reasons. However, the upstream code doesn't seem to be changing that much, and the author doesn't seem to be that interested in our patches (I think he's working on an lcms2 or something).

There would be several advantages to ceasing the pursuit of compatibility:

1-we could get rid of the code we don't use, which is definitely more than 50%. This would reduce code size, give us a leaner implementation, and save us from dealing with false positives stemming from security audits of unreachable code.

2-We could get rid of a lot of overly-general data structures, which would help runtime performance slightly.

3-We could run the source through a formater, which it desperately needs (the indentation is something like 7 15 in some files, and even more bizarre things in other files).

All of the above would make lcms easier to maintain and optimize, which is one of the main reasons I'm interested in it.

This is a proposal, not a decision for action. Comment if you have an opinion.
Cleaner code, easier to optimize, easier to maintain, and alter on easier to integrate with whatever we'll need for hw accel or whatnot?  Sounds good to me.
Having spent some time getting started on this, I've become more and more convinced that this is the right call. There's a huge amount of stuff in LCMS that I didn't even know was there (apparently it has postscript support, among other things). Some of these just involves deleting a source file and removing some functions from the interface, but some of it involves removing tons of spaghetti logic from common routines like cmsCreateTransform that made it very difficult to see exactly what was happening, and more importantly what _could_ happen.

I've got a few WIP patches that I'll post in a minute. Unfortunately, I'm not really going to have time to finish this until the summer. It shouldn't be too big of a deal though, sine we certainly wouldn't want to throw this in 3.1. Unless there's any further discussion, I'll do this first thing when I start back up with moco again in june.
Assignee: nobody → bholley
Attached patch WIP Patch - topSplinter Review
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: