Why my sketch takes time to launch ?

Hello !

I'm building a library and everything works well, but little by little, my sketch is becoming long/slow to start. At the beginning, during my first tests, the sketch started immediatly, but now it take maybe 2-3 seconds each time I launch the compilation (I'm working with Eclipse).

My library is becoming bigger and bigger and it may explain a bit the time it need, but I think it takes too much time...

Right now, I"m using a single "data folder" for every example I did... I observ that every example I start take approximatly the same time to launch, even if I do not load any ressources from the "data folder".

Do you think the launching-time-issue come from how Processing manage the "data folder" ? - and then it will not be a problem anymore if I create one folder by example ? Or does it come from the amount of files used in the library ?

Thanks !

Tagged:

Answers

  • Its not really clear what you are doing.

    (1) Are you using Processing's library template?

    (2) Examples - are these the sketches that will be shipped with the library i.e. will appear in Processing's examples window?

    (3) When you say "launch the compilation" do you mean using the "build.xml" file?

  • Hello Quark Thank you for your message.

    "(1) Are you using Processing's library template?"

    No, I'm building a library for processing, but the work is not totally completed and I don't look at "how to finalize it" yet.

    Right now, what I call "my lib" is just a package with a lot of subpackages and classes inside it.

    "(2) Examples - are these the sketches that will be shipped with the library i.e. will appear in Processing's examples window?"

    When everything will be completed, yes. But I can't create the final structure with one sketech by example now because I'm still working on the library. For the moment, I created a sub-package "examples" and each class inside it concern a new sketch. - I think I will look at the processing library template, it's maybe possible to use the library-in-progress directly inside new sketches... (?) -

    "(3) When you say "launch the compilation" do you mean using the "build.xml" file?" No, I don't even know what is this file :) I mean, when I click on the "run button" in Eclipse. The applet is running immediatly but the screen is white during 3 seconds before the "true start"... And there is no huge operation at the beginning that could explain this behaviour

  • The applet is running immediately but the screen is white during 3 seconds before the "true start"...

    If you stop the sketch then restart it without having made any code changes, do you still get the delay?

  • edited December 2014

    yes

    It's very weird... Even if I just want to draw a single object, I have the start-delay... I have "only" 38 classes, it's not so big... The start-delay is more 5-6 seconds than 2-3 actually... It's becoming boring when I do my tests, I do not know at all what I can do.

    The code in it-self works perfectly, peformance are good and I don't think there is a problem in it - but it's weird... -

  • Answer ✓

    Then I suspect it is something to do with Eclipse but until you can test your library in Processing you won't know for sure.

    BTW any sketch run in Eclipse will be slower than when run directly in Processing.

  • We will see that soon :)

  • It'd be nice if you had your "lib" in GitHub.com too! :ar!

Sign In or Register to comment.