Coder Social home page Coder Social logo

Async Image Generation about drawphone HOT 6 CLOSED

Richie94 avatar Richie94 commented on July 19, 2024
Async Image Generation

from drawphone.

Comments (6)

2xlink avatar 2xlink commented on July 19, 2024

Hello Richie,
what do you mean with "saving of the image"? If you mean the "Download results" button at the end of the results page, the code for image generation and download should be triggered only if you click on it, meaning it is already async.

from drawphone.

Richie94 avatar Richie94 commented on July 19, 2024

Okay, i though that the long part between finishing the game by writing the last guesses and presenting the results comes from the generation of the data-history-dump which is i assumed the picture-creation.

from drawphone.

2xlink avatar 2xlink commented on July 19, 2024

I think it's because the whole history object is serialized on server side, sent to every client and then deserialized on the client. The drawings currently are actually JSON objects, like svg, which can become huge if many players are present (and many things are drawn).
Converting the svgs to jpegs before sending them is on my to-do list, but I did not find time to implement that yet …

from drawphone.

2xlink avatar 2xlink commented on July 19, 2024

I just pushed an update, which should speed things up a bit. You can try it next time! :)

from drawphone.

Richie94 avatar Richie94 commented on July 19, 2024

Great, I'll check soon.

from drawphone.

Richie94 avatar Richie94 commented on July 19, 2024

Tried with 8 players, soo much better. Good job.

from drawphone.

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.