Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

[open] Slow text rendering

edited August 2015 in OpenSesame

It seems that canvas.text (or form.label, or even a feedback item referencing an experiment variable) take a long time to render when the text is quite long. On the order of 10 seconds for about 100 words... The feedback item is the quickest of all these options, but it's still very slow. (Also, I notice that the feedback text label doesn't wrap Chinese text, which is a deal breaker.)

The text is instructional text, so it is static. However, my experiment has been designed to be bilingual, where you choose the language at the start and then it loads the appropriate instructions (i.e., so it can't be prepared during experiment startup).

Is my only viable workaround to create a feedback item with several hardcoded labels, with appropriate "Show If" conditions (i.e., show this label if my language variable is X, show another if it is Y, etc.)?

Thanks;
C

Comments

  • edited 12:20PM

    Hi!

    What back-end are you using now? Psycho and Legacy seem to be a lot faster than xpyriment when it comes to text rendering.

    You could prepare both the Chinese and English (?) text in the prepare-tab of an inline-script item. Than in the run-tab, you could show either of them (with canvas.text() for example) dependent on the language that was chosen.

    Oh and if you are going to use Legacy and you'll be using a multiple-choice item to determine the language, you might want to enable the custom cursor (in the Back-end settings). Otherwise it won't work (on my computer at least).

    Hope this helps!

  • edited 12:20PM

    Hi,

    I was using xpyriment. I tried with Psycho, but that broke my other tasks; fortunately, Legacy didn't break anything and sped things up considerably...enough for it to be usable. Thank you :)

    It's still not wrapping Chinese text, but I can force that with manual line feeds.

  • edited 12:20PM

    It's still not wrapping Chinese text, but I can force that with manual line feeds.

    Could you give an example of this? I.e. what should happen, and what does actually happen in OpenSesame?

  • edited August 2015

    Hi Sebastiaan,

    I think the problem is due to written Chinese not containing any whitespace characters, so it doesn't know where it can wrap.

    Here's a minimal demonstration

    The English text correctly wraps before/at the nearest space to the max_width. The Chinese text just runs off the screen.

    Thanks;
    C

  • edited 12:20PM

    You could try this:

    text = """chinese text """
    

    Instead of:

    text = u'chinese text'
    

    Then put spaces where you want them and adjust the font-size a little so it will fit on the screen.

  • edited 12:20PM

    Hi anonymouse,

    That's basically what I've done to workaround the issue: My source text has manual linefeeds in it where it reaches the max_width. It's a bit awkward to go through the text to place the linefeeds appropriately, but not a huge problem for now :)

    Thanks;
    C

  • edited August 2015

    The English text correctly wraps before/at the nearest space to the max_width. The Chinese text just runs off the screen.

    I figured as much. But there must be rules for how Chinese text should wrap, right? From Wikipedia it looks like it's ok to wrap after any character, with the exception that a handful of characters (mostly punctuation) are not allowed at the start of a line.

    Is my understanding correct? If so, this wouldn't be to hard to implement in OpenSesame.

  • edited 12:20PM

    Hi Sebastiaan,

    I'm not a native Chinese speaker, but yes, that is my understanding of how it works :)

Sign In or Register to comment.

agen judi bola , sportbook, casino, togel, number game, singapore, tangkas, basket, slot, poker, dominoqq, agen bola. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 50.000 ,- bonus cashback hingga 10% , diskon togel hingga 66% bisa bermain di android dan IOS kapanpun dan dimana pun. poker , bandarq , aduq, domino qq , dominobet. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 10.000 ,- bonus turnover 0.5% dan bonus referral 20%. Bonus - bonus yang dihadirkan bisa terbilang cukup tinggi dan memuaskan, anda hanya perlu memasang pada situs yang memberikan bursa pasaran terbaik yaitu http://45.77.173.118/ Bola168. Situs penyedia segala jenis permainan poker online kini semakin banyak ditemukan di Internet, salah satunya TahunQQ merupakan situs Agen Judi Domino66 Dan BandarQ Terpercaya yang mampu memberikan banyak provit bagi bettornya. Permainan Yang Di Sediakan Dewi365 Juga sangat banyak Dan menarik dan Peluang untuk memenangkan Taruhan Judi online ini juga sangat mudah . Mainkan Segera Taruhan Sportbook anda bersama Agen Judi Bola Bersama Dewi365 Kemenangan Anda Berapa pun akan Terbayarkan. Tersedia 9 macam permainan seru yang bisa kamu mainkan hanya di dalam 1 ID saja. Permainan seru yang tersedia seperti Poker, Domino QQ Dan juga BandarQ Online. Semuanya tersedia lengkap hanya di ABGQQ. Situs ABGQQ sangat mudah dimenangkan, kamu juga akan mendapatkan mega bonus dan setiap pemain berhak mendapatkan cashback mingguan. ABGQQ juga telah diakui sebagai Bandar Domino Online yang menjamin sistem FAIR PLAY disetiap permainan yang bisa dimainkan dengan deposit minimal hanya Rp.25.000. DEWI365 adalah Bandar Judi Bola Terpercaya & resmi dan terpercaya di indonesia. Situs judi bola ini menyediakan fasilitas bagi anda untuk dapat bermain memainkan permainan judi bola. Didalam situs ini memiliki berbagai permainan taruhan bola terlengkap seperti Sbobet, yang membuat DEWI365 menjadi situs judi bola terbaik dan terpercaya di Indonesia. Tentunya sebagai situs yang bertugas sebagai Bandar Poker Online pastinya akan berusaha untuk menjaga semua informasi dan keamanan yang terdapat di POKERQQ13. Kotakqq adalah situs Judi Poker Online Terpercayayang menyediakan 9 jenis permainan sakong online, dominoqq, domino99, bandarq, bandar ceme, aduq, poker online, bandar poker, balak66, perang baccarat, dan capsa susun. Dengan minimal deposit withdraw 15.000 Anda sudah bisa memainkan semua permaina pkv games di situs kami. Jackpot besar,Win rate tinggi, Fair play, PKV Games