Git Product home page Git Product logo

Comments (5)

Pirulax avatar Pirulax commented on May 18, 2024

This can be implemented in lua, but it's way faster to do it in c++, because of the time it takes to call an MTA function(3k-12k ms / 10m calls, seems like functions which use argStream.nextIs*() are slower, especially Vector3.create which takes 12k ms / 10m).

from mtasa-blue.

qaisjp avatar qaisjp commented on May 18, 2024

How frequently are you writing to files, and how large are your files (what are you writing?), that the latency is becoming a problem?

from mtasa-blue.

Pirulax avatar Pirulax commented on May 18, 2024

I'll write a lot because the way I save the data of my custom interiors.
It's not a problem for now(since the server hasn't opened yet), but it may became a problem after a while.
I'd make the mentioned functions, but I'm lost a little bit with the File class(can't even figure out how it gets it's size 😂)

from mtasa-blue.

 avatar commented on May 18, 2024

can you please tell me more about File.writeall? How many parameters will this function take? I'm thinking that we can pass a Lua table to the function, and it writes all the data quickly to the file.

from mtasa-blue.

Pirulax avatar Pirulax commented on May 18, 2024

Actually, it should be called 'writeAll'
Nah, I thought it should take the same as write, but before writing it should clean the file up, so only the strings passed to it'll be written, or better:
Just merge it with the current 'write' function and add a 'bClear' argument.

from mtasa-blue.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.