You are here: Re: I've created a small online app to draw diagrams in ASCII... « PHP Programming Language « IT news, forums, messages
Re: I've created a small online app to draw diagrams in ASCII...

Posted by -Lost on 06/07/07 22:33

pwiegers@gmail.com wrote:
>>> Can you tell me what happens? Do you get an JS-error?
>> Sure I can.
>>
>> I see aa[x], and aa[fa] has no properties.
>
> Ah! This only happens on the first column, i see... This should be
> easy to fix...
>
>> Speaking of minifying, it strikes me really funny that your code is
>> exactly 500 lines. Well, assuming your beginning braces for functions
>> and conditionals start on the same line as them.
>
> That's funny :-)
>
>> Anytime. I would like to offer a few more items for digestion though.
>>
>> Why not use DOM methods to create and insert the elements you need
>> instead of relying on the non-standard innerHTML to create *EVERYTHING*?
>
> I tried the first time. It does not perform in IE :-((( The
> performance is very, very bad that way!
> I'm creating a page online where I will explain the 3 different way's
> I used to create the drawing area - so far, only this one performs...
>
> But that is more something for the javascript-usenet group :-)

Yep, and I'll be watching out for your post.

Believe me, if done correctly, DOM code can greatly increase the
efficiency of your code.

I was just benchmarking some code the other day and in a field of 20,000
elements, traversing the childNodes as opposed to seeking with
getElementById yielded that traversing the DOM was 26.25 times faster.

The same can be said about innerHTML as opposed to creating text nodes.

>> You realize that you exclude a *WIDE* range of browsers because of the
>> methods you employ?
>
> Well... FF and IE seem to be doing well... that _is_ 99% of the
> market....

No it isn't. Sure it is high, but it is nowhere near 99% I am sure.
You forgot Mac users (Camino, Konqueror, iCab et cetera) and Opera users.

And for God's sakes man, give the users something to see when JavaScript
is disabled.

>> Oh, and the only thing that I have *ever* seen work, is the new feature
>> you added to pinpoint where you click.
>
> Try to just walk with the cursorkeys a bit, when having pressed the
> drawingbuttong. That should leave you with a drawing - it does on
> every browser I tried... including Opera, minus Konqueror..?

Aaah, there we go. Internet Explorer 6 has a go at it. Now I get
"console is undefined", *sometimes*. It is remarkably slow though.

Now, in Firefox 1.5.0.11 it runs smooth as silk. *EXCEPT*, clicking on
the copy/paste whatever stuff takes quite a few seconds to load.

This also happens in the loading of both Internet Explorer and Firefox,
where it takes a substantial amount of time to load. In actuality I get
a "warning unresponsive script" in Firefox every time and I have to hit
"continue."

Now, you ready for the big kicker? All this time I think I did not hit
a button before traversing with the keys. For the most part I tried to
hit a button, then draw with the cursor. *sigh*

Good job!

--
-Lost
Remove the extra words to reply by e-mail. Don't e-mail me. I am
kidding. No I am not.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация