Uppsats
Performance improvement of a markup language parser in Erlang : An experiment in performance enhancing an XML parser in Erlang
Kandidat-uppsats
KTH/Skolan för elektroteknik och datavetenskap (EECS)
Publicerad: 2025
Språk: Engelska
Sammanfattning
Extensible Markup Language (XML) is a markup language popular for transferring data between applications. However, parsing XML is known to be generally difficult to do efficiently. Consequently, it is of interest to explore ways to improve XML parsing. This is an experimental research project performed on an XML parser that is part of a Cisco product, Cisco Crosswork Network Services Orchestrator (NSO). NSO is one such aforementioned application that can receive XML input. The parser parses XML into data ready to be acted upon by different parts of the bigger system. The parser is implemented in Erlang. Investigating possible ways to enhance XML parsing in Erlang revealed that strings by default are treated as linked lists in Erlang. Erlang binaries offer an alternative way of handling strings. Erlang binaries instead store strings as an array-like data structure. This project investigates to what extent this XML parser can be improved with regard to run time and memory usage by replacing Erlang lists with Erlang binaries. To test this, an alternative version of the parser is created. The two implementations are tested side by side and compared on run time and memory consumption. Results show, contrary to the hypothesis, about a 25 per cent increase in run time for the binary implementation. Regarding memory consumption, the results indicate that the binary implementation performs significantly better only when the parser encounters erroneous or very large inputs. This project concludes that while binaries showed promise, results show that binaries improved performance only in specific circumstances. If a binary implementation is worthwhile, it ultimately depends on how the parser will be used. If a large amount of inputs is expected to be erroneous, or if memory consumption is of utmost importance to keep low at all times, binaries could very well be the solution. For future research, it is recommended to investigate possible optimisations of the binary implementation. Since Erlang as a language lends itself well to parallelisation, this could also be an interesting avenue for investigation.
Utforska vidare
Liknande uppsatser
Uppsatser med liknande ämnen och nyckelord.
Kandidat-uppsats, Institutionen för tillämpad informationsteknologi
Skoogh, Emilia, Sörlie, Elin
Publicerad: 2025-06-25
Kandidat-uppsats
Jansson, Albert, Ullenhag, Lukas
Publicerad: 2025
Kandidat-uppsats, Stockholms universitet/Kriminologiska institutionen
Wiström, Julia, Edvardsson, Astrid
Publicerad: 2025
Kandidat-uppsats, Stockholms universitet/Institutionen för etnologi, religionshistoria och genusvetenskap
Hilding, Pernilla
Publicerad: 2025
Kandidat-uppsats, Göteborgs universitet/HDK-Valand - Högskolan för konst och design
Rasmus Bengtsson
Publicerad: 2025
Kandidat-uppsats, Lunds universitet/Filmvetenskap
Karlberg, Alice
Publicerad: 2025