Support and General Use > Theming and Appearance Customization

use xml for skins?

<< < (2/2)

atsakir:
I could be wrong but a lot of UI APIs use XML to define graphical user interfaces (e.g. CEGUI, QT, Android and even JAVA ME on mobile devices with limited cpu power) so, human readability apart, the structure necessary to define a GUI seems to fit XML quite nicely.

Now, from a code footprint and performance point of view since I haven't really searched to see what solutions are out there involving straight C implementations of XML parsers and I haven't looked deep into the rockbox codebase to see how much the parser code takes up and how fast it performs I can't really compare one syntax to another.

Performance-wise, we must take into account that parsing a theme file happens only once per theme load. Therefore, unless the time it takes to parse an XML-based theme file is 10-fold the time it takes to parse the current syntax I don't see how it is out of the question as the replies seem to indicate.

gevaerts:

--- Quote from: atsakir on June 07, 2010, 10:09:44 AM ---I could be wrong but a lot of UI APIs use XML to define graphical user interfaces (e.g. CEGUI, QT, Android and even JAVA ME on mobile devices with limited cpu power) so, human readability apart, the structure necessary to define a GUI seems to fit XML quite nicely.

--- End quote ---

The fact that xml is used a lot in no way proves that it's suitable for those uses!

If we ever decided that a graphical theme editor is required to make themes, we could consider xml (apart from performance issues), but I really don't think we should do that. Themes should be hand-editable.

Which actual advantages would xml give us?

torne:
Parsing the skins happens *on every boot*, and thus its performance has a direct impact on boot time. Thus, it's generally desirable to have it be as quick as possible... performance is important for anything that happens at startup.

Navigation

[0] Message Index

[*] Previous page

Go to full version