AcademySoftwareFoundation / AcademySoftwareFoundation/OpenColorIO

Optimize how code strings are built up to reduce the library size

Abierto
#2,004 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Feature Request help wanted
Lenguaje dominante
C++
Estrellas
2.1k
Forks
503
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

As part of the nanoColor project, we have been trying to reduce the size of the library. Currently nanoColor is between 1.5-3 MB, depending on the platform and compiler flags but the goal is to get it down to 1 MB or less.

As we have profiled where the size of the existing library comes from, we noticed that there is a lot of size coming from modules that create code. For example, all the modules that build shader code for various GPU languages are among the largest. Another example is the way Exception message strings are built. All of this uses a pattern which is nice to read in the code but which creates a lot of temporary string objects that bloats the library size.

This proposal is to find a better way to build up these long strings from components that is both easy to read in the code but which is much more efficient in terms of the size of the library.

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Comienza perfilando los módulos que generan código de shaders para lenguajes GPU y la construcción de cadenas para mensajes de excepciones descrita en el issue. Compara los enfoques para ensamblar cadenas largas y, después, verifica que el tamaño de la biblioteca se reduzca hasta el objetivo indicado de 1 MB o menos sin perder legibilidad.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
cpp
Área
performance
Tipo de issue
Refactorización
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
25/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.