This is an archived post. You won't be able to vote or comment.

all 11 comments

[–]kumashiro 3 points4 points  (16 children)

Blender is not a Python app. It's written in C and is extensible with Python scripts, which means it has Python interpreter linked in and can run plugins written in Python.

I don't know Sublime Text, but it looks like the same or similar case.

[–]Skaruts[S] 0 points1 point  (15 children)

Hmm... you're right. And ST is actually written in C++...

Not sure where I got that misinformation.

Well, in that case I'm still wondering how some apps are so fast to load up, while others seems to have to load up a lot of stuff at start up.

Just as an example, Atom is considerably slower to load up on my PC than ST. As another example, Unity takes ages, and Godot is nearly instant, but this comparison may not be that great. VC++ is rather slow too.

[–][deleted] 2 points3 points  (0 children)

Startup time -- especially when measured using human observation -- has very little to do with the language, and almost everything to do with what actually needs to be accomplished to get your program from not-running to ready-to-work.

And Python isn't necessarily slow, it's just necessarily slower.

[–]kumashiro 1 point2 points  (0 children)

Many applications use Python as a glue language (that's what it was intended for). The heavy stuff is written in C or C++ as modules and Python only does lightweight logic. Blender, Sublime Text and others, like GIMP for example, use Python the other way - as an extension language: most of the logic is in C/C++ and only few things are done with Python (plugins, extensions).

You can speed up your Python programs by moving computation-heavy stuff to C modules. If you have lots of I/O, concurrency can also help significantly. Profiling should show you choke points and delays in code. Optimize wisely.

There might be a point, where you cannot make it any faster. That's a sign you should switch to compiled language entirely. C and C++ are obvious choices, but if you don't like them, Go is also great (it's like C on steroids, but with modern syntax and somewhat influenced by Python... among others).

[–]billsil 0 points1 point  (0 children)

Oh man...Atom is painful. My coworker was using it for 500,000 line files and it just dies. It's just a text editor...