AcademySoftwareFoundation / AcademySoftwareFoundation/OpenColorIO
Optimize how code strings are built up to reduce the library size
- Lingua principale
- C++
- Stelle
- 2.1k
- Fork
- 503
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia profilando i moduli che generano codice shader per i linguaggi GPU e la costruzione delle stringhe dei messaggi di eccezione descritta nell’issue. Confronta gli approcci per assemblare stringhe lunghe, quindi verifica che le dimensioni della libreria siano ridotte verso l’obiettivo indicato di 1 MB o meno senza perdere leggibilità.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- cpp
- Ambito
- performance
- Tipo di issue
- Refactoring
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100