Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The following examples show how slow it is to load a simple GIF. Can anything be done to make it faster?

System #1: Mathematica, HP notebook, Win7 64Bit, 2 x 2.4Ghz Intel Core i5, 2GB RAM, w/ integrated Intel graphics chipset

  ==> {1.3650781, Null}

System #2: Mathematica, MacBook Pro, OSX 10.7.2, 2.4GHz Intel Core i5, 8GB 1333 MHz DDR3 w/ integrated Intel HD graphics 3000 512MB

  ==> {2.549696, Null}

Both installations are on local drives.

share|improve this question

closed as too localized by J. M., R. M., David, István Zachar, Szabolcs Feb 8 '12 at 16:32

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

It takes only 0.16 seconds or so (via AbsoluteTiming[]) on my installation (8.0.1 on Xubuntu Oneiric on a generic netbook with an Intel Atom processor); maybe you should mention your OS, Mathematica version, and possibly the specs of your computer? – J. M. Feb 8 '12 at 13:19
Is your Mathematica installed on a local drive or a network drive? File operations can sometimes be a lot slower on networks drives. – Arnoud Buzing Feb 8 '12 at 13:37
Please use AbsoluteTiming for benchmarking, Timing has surprises.... – user21 Feb 8 '12 at 14:06
Hmmm. I think this is the case where a great many people can say: "Look, I told you". The performance drop is solely the result of this modified built-in function. – István Zachar Feb 8 '12 at 14:51
I suggest to keep this question, in the following format: @Istvan makes his update as an answer. Then, we either close it or as mods to lock it. From that question on StringJoin, we provide a link to here, as a very good case. Because, overloading system functions is an appealing idea to many people, and nothing serves better as a good stand-alone example, like this one. No amount of warnings would be better, since those warnings warn against "theoretical" threats. – Leonid Shifrin Feb 8 '12 at 15:42
up vote 6 down vote accepted

The cause of the slow speed is the presence of a modified System` function: StringJoin. As this modified StringJoin operates at suboptimal speed (see Leonid's answer and comments here), there is a performance drop of 1-2 magnitudes. So I did learn the hard way why is it a bad idea to modify built-in symbols.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.