bradio10 Posted June 14, 2015 Posted June 14, 2015 Hi, I have made a system so I can have multi language support and I currently have all the logic for translations in Lua tables, but I was wanting to know if it would be better to have all the tables in XML? Would XML be more faster and more efficient than having them in Lua tables or would it not really matter? Thanks. Streamline Servers Vultr.com | Worldwide VPS's at an awesome price. Buy one here!
John Smith Posted June 14, 2015 Posted June 14, 2015 xml would make server lag if a lot of things are inside a simple file would do fine in my opinion. [ you can e.g make a table and when u want to save a table to file use toJSON and save it, and when loading it use fromJSON ] If you find my post useful or if it helped you, please like my post Ingame name: ZoeN
Dealman Posted June 14, 2015 Posted June 14, 2015 Tables are pretty efficient, for example I made a parser which reads a file that has thousands of lines of text. I then loop through this table, splitting each individual line into different parts to make it easier to use the data and store it in a new table. All in all, the whole process takes around 6ms for over 1500 lines. That includes the entire process. Read the file -> Store each line in a table -> Loop through the table, split the strings into parts -> Store into a new table If I help you in a thread and you need further assistance, please don't PM me - use the thread you created instead. This way everyone on the forum can take advantage of it.
jingzhi Posted June 19, 2015 Posted June 19, 2015 Hi,I have made a system so I can have multi language support and I currently have all the logic for translations in Lua tables, but I was wanting to know if it would be better to have all the tables in XML? Would XML be more faster and more efficient than having them in Lua tables or would it not really matter? Thanks. Marked
ixjf Posted June 19, 2015 Posted June 19, 2015 xml would make server lag if a lot of things are insidea simple file would do fine in my opinion. [ you can e.g make a table and when u want to save a table to file use toJSON and save it, and when loading it use fromJSON ] This myth that XML will magically lag the server needs to end. It doesn't, unless you use it incorrectly, like anything else. I used to know how to code, but then I took an arrow in the knee. Project Redivivus - Remaking Old School MTA With New Code MTA 0.6 Nightly 1 released
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now