Live data from Hacker News

Developing a Beautiful and Performant Block Editor in Qt C++ and QML

rubymamistvalove.com

61–66 of 66 posts

Re: Developing a Beautiful and Performant Block Editor in Qt C++ and QML

#61

Earlier quoted context omitted.

> than it could also be compiled to C++ People who are going to use it should read the documentation. “It depends” and “it’s still slow” are the fairest comments I can make about this.

If you ever run into trouble with execution of JS slowing down your Qt/QML application, you are using way too much JS. The most common performance issues in decently written applications are rendering of invisible items aka overdraw (especially on very weak embedded SoC GPUs) and slow startup time. There is tooling to find these and ways to fix or improve them.

Hi there!

> The most common performance issues in decently written applications are rendering of invisible items aka overdraw

That's indeed what I found as well! Especially, these hidden items consume a lot of unnecessary RAM. What tools do you know for Qt/QML that can help with this issue?

Re: Developing a Beautiful and Performant Block Editor in Qt C++ and QML

#62

Earlier quoted context omitted.

If you ever run into trouble with execution of JS slowing down your Qt/QML application, you are using way too much JS. The most common performance issues in decently written applications are rendering of invisible items aka overdraw (especially on very weak embedded SoC GPUs) and slow startup time. There is tooling to find these and ways to fix or improve them.

Hi there! > The most common performance issues in decently written applications are rendering of invisible items aka overdraw That's indeed what I found as well! Especially, these hidden items consume a lot of unnecessary RAM. What tools do you know for Qt/QML that can help with this issue?

QSG_VISUALIZE=overdraw, and the other options described here help with rendering performance well: https://doc.qt.io/qt-6/qtquick-visualcanvas-scenegraph-rende...

For another perspective and more details, RenderDoc (or another frame debugger if you have one) is a nice tool as well.

Also don't use Rectangle { color: "transparent" }, use Item {}. An Item has geometry, but doesn't render anything. A transparent Rectangle probably also doesn't render, but it's still (at least slightly) more resource-intensive and makes you look like you don't know what you're doing.

Use Loader, StackView and visible liberally to disable stuff that isn't currently relevant. If unloading causes trouble with lost state, you may be carrying too much state on the QML side.

Re: Developing a Beautiful and Performant Block Editor in Qt C++ and QML

#63
post #22

I've worked with Qt about 15 years writing several applications both for work and for fun and overall I think it's a really powerful platform. Not without it's idiosyncrasies and quirks of course. That being said I find that QML is complete trash. It's fine for simple UIs with minimal logic and prototypes but for anything beyond that you'll always need to implement the logic in C++ and this is where the pain enters t…

(Author here) I think the fact that Qt went with Javascript as the scripting language for QML wasn't a smart decision - especially resulting in poor type safety. That said , they have improved the situation by a lot with required properties, Q_ENUM where you can now share enums between C++ and QML etc etc. I don't agree that QML is just for simple UIs, that's exactly what I tried to demystify - my block editor is a v…

Would you mind elaborating on "I decided to make Daino Notes closed source due to difficulties in monetizing FOSS" ?. How do you plan to monetize this?

Re: Developing a Beautiful and Performant Block Editor in Qt C++ and QML

#64

Earlier quoted context omitted.

Hi there! > The most common performance issues in decently written applications are rendering of invisible items aka overdraw That's indeed what I found as well! Especially, these hidden items consume a lot of unnecessary RAM. What tools do you know for Qt/QML that can help with this issue?

QSG_VISUALIZE=overdraw, and the other options described here help with rendering performance well: https://doc.qt.io/qt-6/qtquick-visualcanvas-scenegraph-rende... For another perspective and more details, RenderDoc (or another frame debugger if you have one) is a nice tool as well. Also don't use Rectangle { color: "transparent" }, use Item {}. An Item has geometry, but doesn't render anything. A transparent Rectangl…

Thanks for that! Really helpful advice here.

Re: Developing a Beautiful and Performant Block Editor in Qt C++ and QML

#65
post #63

Earlier quoted context omitted.

(Author here) I think the fact that Qt went with Javascript as the scripting language for QML wasn't a smart decision - especially resulting in poor type safety. That said , they have improved the situation by a lot with required properties, Q_ENUM where you can now share enums between C++ and QML etc etc. I don't agree that QML is just for simple UIs, that's exactly what I tried to demystify - my block editor is a v…

Would you mind elaborating on "I decided to make Daino Notes closed source due to difficulties in monetizing FOSS" ?. How do you plan to monetize this?

You can see on the website: https://www.get-notes.com/pricing

You can pay for the Pro version to use advanced blocks such as kanban, images,Drop cap. Also, the free version limits you to 10 notes.

BUT, I'm planning to change that very soon, I will make all the current Pro features free and the only thing that will cost money will be cloud storage with real-time sync when I'll release the new mobile app.

Re: Developing a Beautiful and Performant Block Editor in Qt C++ and QML

#66
post #63

Earlier quoted context omitted.

Would you mind elaborating on "I decided to make Daino Notes closed source due to difficulties in monetizing FOSS" ?. How do you plan to monetize this?

You can see on the website: https://www.get-notes.com/pricing You can pay for the Pro version to use advanced blocks such as kanban, images,Drop cap. Also, the free version limits you to 10 notes. BUT, I'm planning to change that very soon, I will make all the current Pro features free and the only thing that will cost money will be cloud storage with real-time sync when I'll release the new mobile app.

Ah! Thanks. It wasn't loading for me for some reason.

Yup good plan, tying Pro to cloud features makes sense for subscription model.

Post reply on HN