Code Monkey home page Code Monkey logo

Comments (17)

rdb avatar rdb commented on May 22, 2024

Which version of Panda are you using? Panda 1.10 has gotten dramatic improvements in text generation performance.

from panda3d.

theclashingfritz avatar theclashingfritz commented on May 22, 2024

Even with the major improvements... I can't say it doesn't take forever when it does.

from panda3d.

drewc5131 avatar drewc5131 commented on May 22, 2024

@rdb I am currently using Panda 1.10, not the most recent version as i do not have a version of it with astron, but it is still 1.10

from panda3d.

rdb avatar rdb commented on May 22, 2024

Which revision of 1.10? Perhaps you could check git log -1 if you built from source and give me a commit hash.

Please make sure this PRC setting is set to ensure the improvements are active, and that it's not overridden anywhere to be false:

text-dynamic-merge 1

Also, you could try setting text-flatten 0 which may further speed up text generation, and setting text-page-size 512 512 (or higher) if a lot of different glyphs are being used, to reduce the amount of garbage collection.

If these settings don't help, there must be something about your specific configuration that is causing it to be less efficient. Please attach a test case reduced to the absolute minimum amount of code and models required for me reproduce this performance issue.

from panda3d.

theclashingfritz avatar theclashingfritz commented on May 22, 2024

HarfBuzz may help as well. I'd try tests with both it and FreeType.

from panda3d.

drewc5131 avatar drewc5131 commented on May 22, 2024

@theclashingfritz can you elaborate on what you mean?
@rdb They didnt seem to help too much.

from panda3d.

theclashingfritz avatar theclashingfritz commented on May 22, 2024

@drewc5131 Panda3D has support for https://www.freedesktop.org/wiki/Software/HarfBuzz/

from panda3d.

rdb avatar rdb commented on May 22, 2024

HarfBuzz won't help with performance. Leave it off if you don't need it.

I'm going to need that test case since I don't have any other information to go on here.

from panda3d.

drewc5131 avatar drewc5131 commented on May 22, 2024

I can't really do a separate test case because this is something that's only really a problem with what Toontown requires, like having building names

from panda3d.

rdb avatar rdb commented on May 22, 2024

In order to do anything with this I will need a simple reproduction case. You could create this by creating a simple program that only displays text in a way that your real application does, in a similar quantity. Alternatively, it might be possible to debug this if you installed the pdbs for the build and created a dump from a sampling profiler (such as VS' built-in profiler), but it would be easier to just have a reproduction case. Otherwise I will have no choice but to close this issue.

Thanks in advance!

from panda3d.

rdb avatar rdb commented on May 22, 2024

It may be easier to just dump the entire scene with text and all to a .bam file using writeBamFile, after all the text has been loaded into it, so that I will be able to profile the resulting bam file with pview.

from panda3d.

rdb avatar rdb commented on May 22, 2024

Could you follow up on this? It should be straightforward to dump a scene to bam, with TextNodes and all, and it would really help me get to the root of why the new text generation code isn't achieving adequate performance in your application. I can provide my e-mail address if you cannot post the scene publicly.

from panda3d.

theclashingfritz avatar theclashingfritz commented on May 22, 2024

I'll see if i can reproduce this and dump it to a .bam for you.

from panda3d.

theclashingfritz avatar theclashingfritz commented on May 22, 2024

I did a dump of a scene. I'm unsure if it contains the same issue but feel free to check it out anyways.

TestCase.zip

from panda3d.

rdb avatar rdb commented on May 22, 2024

There are no TextNodes in the attached bam file according to bam-info -ls TestCase.bam. Please ensure that the bam file is generated after the text nodes are introduced into the scene.

from panda3d.

rdb avatar rdb commented on May 22, 2024

Could you please provide the requested information? Either a test case, .bam file containing TextNodes, a specification of the settings and contents of the text in your scene so that we might be able to construct a test case, or anything that could provide some clues as to the nature of this bottleneck. Does the text have any text properties applied? Embedded graphics, perhaps?

Without any leads to go on, there's nothing we can do. My own text rendering test cases don't exhibit this performance issue.

from panda3d.

rdb avatar rdb commented on May 22, 2024

Closing for now due to lack of response. Unfortunate, since if there really still is a bottleneck in the text generation system, I would like to see it fixed.

from panda3d.

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.