Why is pyscript is so slow

If pyscript will slow . There is no adventage of pyscript in web devlopment . I think we have to make pyscript like javascript. that excute there code directly. Not use webassembly and translate there code other language like javascript

Can you add more detail and context? What is slow about PyScript? I have no problems with performance.

A couple of notes:

  • pyscript is very very new! We are exploring what is possible before focussing on optimising for performance
  • probably you are worried about initialisation time, which will get much better as we improve the story around packaging and more pyscript is cached by your browser and the CDN
  • webassembly does NOT translate python to JS, it directly runs Cpython using the browser’s runtime. It can be almost as fast as python running in a standalone process.
5 Likes

I use a low spec laptop to check performance of pyscript. Here many time pyscript failed to run . It’s excution time is too much. Where js is too quick on that laptop.

I am student . Should I go for js or pyscript .

Should I go for js or pyscript .

pyscript is not (yet) a language that’s in use in real production webapps.

My thinking…If your goal is to do web sites, stick with JS. I don’t believe PyScript is really targeting that.

If your goal is Python and you want a UI, Pyodide/PyScript is interesting.

The tough spot is in between. If your goal is web applications and you aren’t yet committed to one or the other…hopefully PyScript becomes more of a competitor there.

3 Likes

Many students and people with scientific background love Pyscript, because it allows us to make our ideas (of course with python) to real web apps.
if someone is interested to scientific programming, Python is the just and only answer.
But if someone wants to be web dev, look no further than JS.

JavaScript is just a language. It is the runtime environment, frameworks, libraries, tools, etc. that are the key factors. Today, you can develop web applications in many languages. Web development is just one segment of technology.

If you were in the house construction business, knowing only JavaScript would be like only knowing how to install plumbing. There are many other disciplines, like electrical, framing, siding, roofing, landscaping, etc., etc., etc. The computer industry is the same. The language, in general, means very little today.

2 Likes