00:00
<jwalden>
this is pretty small pain, just search for addEventListener and message
00:00
<jwalden>
so it's not too bad
00:11
<jwalden>
and indeed, I think I'm done making the changes now :-)
00:12
<jwalden>
nearly, at least
00:12
jwalden
curses multiple inheritance ambiguity
00:42
<Hixie>
cool
00:42
<Hixie>
i'm playing twilight imperium 3 right now
00:42
<Hixie>
but when i get back home i'll send mail about it
00:42
<jwalden>
heh
00:43
<jwalden>
thanks
00:43
jwalden
waits for recompile
00:45
<jwalden>
othermaciej: it's not so much the timing of the late-breaking changes that makes me sad as that they're going to make it very, very, very hard for anything like the original circumstances where postMessage got approval to land so late to ever happen again
00:45
<jwalden>
othermaciej: I think if people had known the two sets of changes were going to happen after that, they'd have said no
00:45
<jwalden>
heck, *I* might even have said no
00:46
<othermaciej>
jwalden: I probably would have said yes to the postMessage work before Safari 3.1 even if I had known it would be followed by changes, because I think that level of engagement was part of what led to the changes
00:46
<othermaciej>
(and I think the changes that made us pull it were for the better)
00:47
<othermaciej>
I do understand that implementing features against an unstable spec, especially late in a dev cycle, can be disruptive
00:47
<jwalden>
I had the work all done for several months; it just wasn't in the tree because we were "past" feature freeze
00:47
<jwalden>
I don't mind the implementation
00:47
<Philip`>
jwalden: If the feature wasn't approved for FF3, how long would it be before it could be in a release?
00:47
<jwalden>
I don't know
00:47
<jwalden>
that's the other half of the matter
00:47
<jwalden>
as I understand it .next is supposed to be a quick turnaround, but I don't know how quick
00:48
<Philip`>
Is .next different from Mozilla 2?
00:48
<jwalden>
I *think* so
00:48
<Philip`>
Mozilla 2 has never sounded particularly likely for quick turnaround to me
00:48
<jwalden>
a 3.5, so to speak, with a few cherry-picked things
00:48
<othermaciej>
for Safari/WebKit I am expecting gaps of less than a year between releases with new engine features for the foreseeable future
00:48
<Philip`>
The whole "let's (automatically) rewrite all our code and change all our APIs" thing makes me a little nervous
00:48
<jwalden>
if it's not different from 2, then it's not a quick turnaround
00:49
<jwalden>
the change APIs thing is more, "we'll change where we've needed to change"
00:49
<gavin_>
Mozilla 2 work is being scoped back beyond the vague "rewrite everything" plans from 2 years ago
00:49
Philip`
wonders if he might get canvas shadows into 3.5 :-)
00:49
<jwalden>
but yeah, I'm still not clear on exactly how everything's panning out
00:49
<gavin_>
and, that's expected, really
00:49
<gavin_>
Philip`: almost certainly
00:50
<jwalden>
reasonably self-contained feature-size things are generally what's in the plans
00:50
<Philip`>
Hmm, I did the shadow thing six months ago - I didn't realise it was that long :-/
00:51
<Philip`>
(and apparently it was feature freeze back then)
00:51
<jwalden>
so the 100K patch that adds stuff and doesn't have twisty interactions but is just too late to trust, is the prototypical "take"
00:51
<jwalden>
but no fundamental reworkings of anything
00:51
<Philip`>
That sounds quite sensible
01:14
<Philip`>
Hooray, I used the scientific method today
01:15
<Philip`>
There were about a hundred small flying insects sitting on the ceiling by the light above my bed this evening, so I hypothesised that they were attracted by lights
01:16
<Philip`>
so I turned that light off and pointed a desk lamp at a wall as far away as possible (about two metres) from my bed, and after several hours they've nearly all migrated to that wall
01:16
<Philip`>
so I think I'll consider my hypothesis to be true
01:16
<Philip`>
Also it means I can go to bed without being scared of insects dropping onto my head
01:17
<othermaciej_>
you can consider your hypothesis not falsified by your experiment
01:17
<othermaciej_>
(if you wanna be hardcore scientific method)
01:17
<Philip`>
I don't want to be that hardcore - I like to be able to believe that at least some things in this world are true, and aren't merely not known to be false :-)
02:28
<Philip`>
https://bugs.webkit.org/show_bug.cgi?id=18762#c2 - oops, I guess I should have checked that
02:44
<weinig>
Philip`: :)
02:45
<weinig>
Philip`: it took me a couple minutes to notice as well
02:45
<weinig>
Philip`: still, that is a bad bug
02:49
<Philip`>
weinig: I really should have realised that if it only had one yellow rectangle, the drawImage wasn't working
02:50
<weinig>
meh
02:50
<weinig>
Philip`: that is my job :)
02:50
<Philip`>
At least it is an actual bug, so I can still legitimately complain about it :-)
02:50
<weinig>
:)
03:03
<Hixie>
man, philip is still complaining about canvas
03:04
<Hixie>
i'm pretty sure that by now the spec has been fixed so many times because of his feedback that his complaints are actually complaints on his own earlier suggestions
03:17
<Dashiva>
You could have a live re-enactment of this one: http://ansuz.sooke.bc.ca/bonobo-conspiracy/?i=926
03:19
<Philip`>
Hixie: I think some of the cases are where I originally suggested something far too complex, and you changed the spec to say something near that but slightly too simple, so more feedback is needed, and hopefully it'll stop oscillating and settle on something nearly correct :-)
03:19
<Hixie>
:-)
03:20
<Philip`>
but sometimes I just change my mind and disagree with my former self
03:20
<Philip`>
and sometimes I disagree with my current self, but that's harder to sort out
04:20
<htmlfivedotnet>
Hello all
04:24
<htmlfivedotnet>
I think that most on this channel are on a different time zone than me, and probably asleep by now, but I saw some grievance about my site, and wanted to settle it with those directly involved. Any and all problems or issues I am more than happy to fix
04:38
<Hixie>
heya
04:38
<Hixie>
i think so long as you comply with the license and give clear attribution, nobody is too worried
04:38
<Hixie>
also if you make money you should send us some goodies as thanks :-D
04:41
<htmlfivedotnet>
after I saw annevk had already found my site, two days after purchase, i made sure to put that info at the top, as I saw you guys notice. It isn't that I hadn't planned to do so, it's just that it was and is still a WIP.
04:41
<htmlfivedotnet>
It looks like I'm going to have to modify the plugin to post the correct date, and have the correct linkback to the original post... which seems like it's going to be harder to do than i hoped
04:43
<Hixie>
heh
04:44
<Hixie>
welcome btw :-)
04:45
<htmlfivedotnet>
hey, thanks :-)
04:49
<htmlfivedotnet>
so am i missing something, or is this where the authors and contributors get together to discuss html5?
04:49
<Hixie>
yup, this is the whatwg irc channel
04:49
<Hixie>
but it's a weekend
04:49
<Hixie>
and 5am in europe
04:52
<htmlfivedotnet>
it sure is. that's a shame, I do my work at night. Hopefully I can still contribute in some way.
08:57
<annevk>
Hmm, browsing through the XTech schedule I find this: http://2008.xtech.org/public/schedule/detail/653
08:57
<annevk>
That could be fun...
08:58
<Hixie>
i wish we could boil the oceans
08:58
<Hixie>
it would make the web such an easier place to code
08:59
<Hixie>
and silverlight is a much better boil-the-oceans solution than xhtml+xforms+svg, for sure
09:39
<Lachy>
hey htmlfivedotnet, welcome.
09:50
<Hixie>
http://www.whatwg.org/specs/web-apps/current-work/#dialogs
10:40
<hendry>
is there any <audio> hacks with Flash, in order to playback mp3/oggs in "legacy" browsers?
10:41
<hsivonen>
Philip`: so far it seems that switch-case block per tokenizer state is insanely bad on Java 5 PowerPC HotSpot client VM
10:41
<hsivonen>
like makes-you-want-to-cry bad
10:43
<hsivonen>
there should be like a 30x perf gain if the compiler did the right thing
10:54
<hsivonen>
Conceptually, both return and switch on enum should compile into a jump to an address
10:55
<hsivonen>
but it seems switch on enum is ridiculously slower than return
11:13
<hsivonen>
hmm. after googling, I find that on Sun HotSpot 5, switch on enum is insanely bad compared to switch on int
11:25
<Philip`>
hsivonen: I've always assumed that enums are basically lists of static objects, so enum values are pointers and are only determined at runtime and it'd have to compile into "if (value == ONE) ... else if (value == TWO) ..." (or a binary search if the optimiser was really clever), so it makes some sense that that's much slower than a compile-time non-sparse integer switch table
11:25
<Philip`>
but my assumptions could be horribly wrong
11:25
<Philip`>
and I've never known how to attempt to validate my assumptions about how the JVM works :-(
11:26
<hsivonen>
Philip`: for switch enums map to ints. (check out 'ordinal' in a debugger)
11:26
<hsivonen>
Philip`: but it seems that the VM gets an array of the ordinals every time it enters the switch or something similarly insane
11:27
<Philip`>
Ah, okay
11:28
<Philip`>
Hixie: Did you change the IE icon used by the spec status annotation thing? (http://msdn2.microsoft.com/en-us/library/ms535205.new(en-us,VS.85).gif is now a star thing, which doesn't look like IE at all)
11:28
<hsivonen>
Philip`: anyway, the code I wrote should have been the best-performing alternative if switch on enum was like jump to an address held in a variable
11:29
<hsivonen>
but it's nothing of the sort
11:29
<annevk>
installed hardy
11:29
<hsivonen>
so now I have to refactor some more with the assumption that using 'return' is a big win
11:29
<annevk>
apart from the bird i don't notice anything new
11:29
hsivonen
installed hardy on Parallels
11:30
<Philip`>
hsivonen: Can't you switch on int, if that isn't so slow?
11:30
<hsivonen>
Philip`: I'm going to ints right about now
11:30
<Philip`>
Okay - it'll be interesting to see what happens :-)
11:33
<annevk>
ipodtouch update for 18 EUR is pretty neat
11:35
<annevk>
Hixie, maybe you should add a note that the "features" argument is not defined/used?
11:40
<hsivonen>
Philip`: avoiding enum gives me an 8% boost on Java 5 PPC client
11:40
<hsivonen>
the overall perf still sucks big time
11:40
<Philip`>
hsivonen: Hmm, that doesn't sound fantastic
11:41
Philip`
wonders why it's so slow
11:41
<hsivonen>
looks like I should make read() a method again, so that the VM can do a fast jump on return
11:41
<Philip`>
Do you have a profiler that can tell you where the JVM is spending all its time?
11:41
<hsivonen>
given that switch seems to suck badly
11:41
<hsivonen>
Philip`: I do
11:42
<Philip`>
(I know VTune can do that, but the output always seems pretty confusing, particularly since the program keeps getting recompiled at runtime)
11:43
<hsivonen>
also, if switch is expensive, I should probably reintroduce for(;;) { ... continue; ...} for staying in a state
11:43
<hsivonen>
if I make read a method again, that would be doable again
11:43
<hsivonen>
I want me some goto with memory address variables
11:44
<Philip`>
How would that work, when the JIT can keep changing the address of the code to execute?
11:44
<hsivonen>
pointers?
11:45
<Philip`>
Pointers to what?
11:45
<hsivonen>
pointers to VM managed code memory addresses
11:45
<Philip`>
Ah, that sounds plausible
11:47
<hsivonen>
it sucks how much juggling is needed to get fast jumps without goto
11:47
<hsivonen>
particularly is switch is not part of the arsenal
11:47
<Philip`>
switch is fast in C++ :-)
11:48
<hsivonen>
it could well be that the code I now would be fast in a line-by-line port to C++
11:50
<hsivonen>
I think I'm going to have to introduce duplicate code for states that can be entered with both "consume" and "reconsume" :-(
11:50
<hsivonen>
unless I split out methods
11:52
<hsivonen>
it also sucks that all kinds of config affects read()
11:52
<hsivonen>
so read() is full of conditionals
11:52
<hsivonen>
I bet this would be so much faster if the parser config happened at compile time
11:54
<hsivonen>
perhaps I should have an abstract class with read() and subclasses with implementation for each config combo..
11:55
Philip`
is too used to C++, where virtual methods are scary and slow
11:56
<hsivonen>
or at least I should make the conditionals on final booleans instead of non-final enums
11:56
<Philip`>
but modern CPUs are too clever and have too many caches and things, so things I thought were true five years ago are even less likely to be actually true now :-(
11:56
<hsivonen>
although in ifs enum compare should be memory address compare
11:57
<hsivonen>
if anything, all this shows that HotSpot doesn't magically make any code fast but different refactoring do affect perf
12:05
<Philip`>
You just need to wait for the next version of HotSpot, which will magically make everything faster than C++
12:05
<hsivonen>
Actually, the above was on PPC HotSpot 5
12:06
<hsivonen>
next, I'm going to run test on x86 HotSpot 7ish
12:06
<Philip`>
Regardless of the version, it's always the next one that'll make code fast
12:06
<hsivonen>
I installed icedtea under Parallels
12:07
<hsivonen>
I wouldn't care if this was about as fast as Xerces, but it used to be 50% of Xerces perf
12:07
<hsivonen>
and now it's 5% of Xerces perf
12:08
<hsivonen>
so I think I should be able to do something that gives a ten-fold boost again
12:08
<Philip`>
Something other than 'svn revert'?
12:08
<hsivonen>
yeah. I want something that preserves desirable characteristics of this refactoring
12:12
<hsivonen>
but anyway, I now very much sympathize with Antlr devs wanting to go straight to bytecode
12:13
<hsivonen>
also, I now understand why Java XML parsers have a ton of methods instead of a huge switch
12:15
<hsivonen>
I wonder if using exception to break a loop is still bad
12:16
<Philip`>
I'm pretty sure exceptions are an area where Java beats C++, but that's because C++ is rubbish at them and I have no idea how significantly less rubbish Java is :-)
12:18
<hsivonen>
the tokenizer loop already has to be prepared to exit on ArrayIndexOutOfBoundsException, so I wonder if an additional exception is costly
12:18
<hsivonen>
I wonder if JVM hacker would be amused at this IRC log of discovery of what sucks and what doesn't suck on HotSpot
12:19
<Philip`>
Xerces-C has a particularly annoying issue where it throws an EndOfEntityException while parsing an XML file, and the Visual Studio deugger prints a message to the debug window whenever an exception is thrown, and the debug window is immensely slow (like ~10ms to print a single line), which makes anything using Xerces a lot go very slowly while debugging
12:24
<Philip`>
(I want to replace Xerces with a nicer XML parser in that program, but the problems are hidden for now since all the parsed XML gets cached into some custom binary-XML format, and there are always other more useful things to work on before replacing the XML parser...)
12:47
<hsivonen>
My test harness is available from http://about.validator.nu/htmlparser/perf.zip
12:58
Lachy
is upgrading blog.whatwg.org
13:00
<Lachy>
WP 2.5 is awesome
13:00
<Lachy>
let me know if anything went wrong with the upgrade
13:08
<Lachy>
wow, it has automated plugin updating feature. All I have to do is click "update automatically" on each out of date plugin.
13:19
<hsivonen>
I reuploaded an updated perf harness
13:27
<Philip`>
Lachy: Hopefully that's not the version of 2.5 that lets any user register and give themselves an admin account? :-)
13:28
<hsivonen>
OpenJDK 6 HotSpot running under Parallels on my MacBook is much faster than my PowerMac G5
13:29
<Philip`>
What type of MacBook is that?
13:29
<hsivonen>
pro desktops get overtaken by non-pro laptops in under 3 years
13:29
<hsivonen>
Philip`: the middle one of the current lineup
13:29
<hsivonen>
2.4 GHz Core 2 Duo
13:30
<Philip`>
Ah, that's a quite decent CPU :-)
13:30
<hsivonen>
the PowerMac is Dual 2.0 GHz G5
13:30
<Philip`>
though is your performance testing thing using >1 core?
13:31
<hsivonen>
it's single-threaded
13:32
<Lachy>
Philip`, it's the latest verstion available from wordpress.com
13:32
<Lachy>
so hopefully the fixed that bug
13:33
<Philip`>
Hmm, looks like (at least) the MBP lineup changed recently - the middle one was 2.4GHz/160GB not long ago, and is 2.5/250 now
13:33
Philip`
wonders when that changed
13:34
<Philip`>
Oh, apparently two months ago
13:35
<Lachy>
Philip`, yeah, that's when they added multitouch to the MBPs just like the new MBAs
13:35
<Philip`>
Computers should stop getting better all the time :-(
13:36
<Philip`>
Lachy: I'd be happy enough if they just made the touchpad less totally rubbish under Windows
13:37
<Lachy>
Philip`, you shouldn't be running Windows on a Mac! That's just cruel.
13:37
<Philip`>
Lachy: But OS X hasn't done anything to make me like it, and I want to play games :-)
13:37
<Lachy>
but what's so rubbish about it?
13:38
<Lachy>
except that it can be a bit slow and insensitive at times.
13:39
<Philip`>
You can't touch to click; the scrolling thing is extremely sensitive to the orientation of your fingers, so it often goes up when you want it to go down; to right click you need two fingers and then click the button, but since the scrolling is very sensitive you end up scrolling instead of clicking
13:39
<Philip`>
I'm not sure if it's even possible to middle-click
13:40
<Lachy>
AFAIK, it's not possible to middle click on any touchpad
13:40
<Lachy>
but tap to click should work. It definitely works under OSX
13:40
<Philip`>
It is on my cheap HP with Linux - press left+right buttons together, or tap with two fingers
13:40
<Philip`>
(and three fingers for right-click)
13:41
<Philip`>
Lachy: The touchpad works far better under OS X (except for really slow acceleration that I haven't got used to) - it's just the Windows (Boot Camp) driver that is barely usable
13:44
<Philip`>
Oh, also the touchpad is directly under my (right) wrist when I'm playing a game with WASD controls, so I have to stick several layers of tissues over it to avoid it getting misinterpreted as intentional mouse movement
13:45
<Lachy>
do you use your right hand to use WASD controls, instead of your left?
13:45
<Philip`>
Yes
13:45
<Philip`>
since I use my mouse left-handed
13:45
<Lachy>
wow, that's crazy
13:46
<Philip`>
and remapping the controls is too much of a pain, since most games need dozens of keys
13:46
<Philip`>
(I'm not really left handed, since I write with my right)
13:46
<Lachy>
I can't operate a mouse at all with my left hand
13:47
<Philip`>
I can manage up/down/left/right/left-click with my right, but anything needing precise aiming is more of a pain
13:48
<Philip`>
(I tend to assume the only problem is practice, rather than some physical incapability, but I've never bothered trying to test that)
13:50
<Philip`>
Oh, also the MBP doesn't have a right mouse button, so I can't do the right-left or left-right mouse gestures in Opera, which is a pain
13:51
<Lachy>
Cmd+Left and Cmd+Right works well enough for that
13:51
<Lachy>
though it would be nice to have the multitouch touch pad that supports it natively
13:54
<Philip`>
I'm thinking of the right-button-then-left-button thing, not the right-button-and-move-right-to-left thing - would multitouch support the former?
13:55
<Lachy>
multitouch supports 3-finger swipe on the touchpad
13:56
<Lachy>
I'm not sure if it works in Opera though, there are a few things that don't because it's a carbon app, not cocoa.
13:57
<Lachy>
oh, wait, that's on mac. not windows
13:57
<Lachy>
I'm not sure how well the multitouch features would function in windows.
14:34
<hsivonen>
Philip`: OK. Now I think I have benchmark data showing that switch in Java sucks
14:34
<hsivonen>
Philip`: so given a choice between private final methods and avoiding method invocation using switch, one should take the methods any day
14:38
<hsivonen>
http://pastebin.ca/999313
14:51
<Philip`>
hsivonen: I get 31240/17893/1679 for the three real runs over one minute on http://en.wikipedia.org/wiki/Main_Page on a 2.0GHz C2D with "Java(TM) SE Runtime Environment (build 1.6.0_05-b13)", "Java HotSpot(TM) Client VM (build 10.0-b19, mixed mode)"
14:51
<Philip`>
so that seems to agree with your results
14:54
<hsivonen>
Philip`: thanks.
14:54
<hsivonen>
Philip`: re: profiling: the profiling measures execution time in methods
14:55
<hsivonen>
so it doesn't tell what exactly sucks inside the huge method
14:55
<hsivonen>
in general, though, isPrivateUse and isNonCharacter take way too much time
14:56
<Philip`>
VTune gives profiling data at the JITted x86 instruction level, which is sometimes a nicer way of looking at things
14:59
<hsivonen>
how big a deal getting VTune and setting it up on Leopard or Hardy is? it looks like a for-pay product mainly for Windows.
15:00
<hsivonen>
mm. 700 dollars
15:00
<hsivonen>
not exactly cheap
15:02
<Philip`>
I just used the free evaluation version a few years ago on Windows
15:02
<Philip`>
so it's probably far from the best solution
15:02
<Philip`>
but I don't know what other tools implement the same kinds of features
15:02
<Philip`>
(I'm pretty sure there are some, I just have no idea what they're called)
15:05
<hsivonen>
I think it is pretty safe to conclude that given my findings and the Antlr page, switch sucks
15:05
<hsivonen>
so the next step I should take is using more return and continue without switch
16:16
Philip`
reads the definition of arcTo, and wonders who to blame for it
16:17
<Philip`>
I suppose it's either me, or Hixie, or whoever wrote the equivalent function in OS X
19:10
<virtuelv>
some canvas neatness to rest your eyes on, http://www.p01.org/releases/DHTML_contests/files/20lines_twinkle/
19:13
<Philip`>
Much smoother in Firefox 3 than Opera 9.5 :-)
19:13
<Philip`>
(at least on Linux)
19:14
<Philip`>
Only seems to render the first frame in Konqueror 4, then stops
19:15
<virtuelv>
I don't notice much of a difference between Opera and FF here
19:15
<virtuelv>
moving the cursor modifies the animation
19:15
<Philip`>
Hmm, Safari 3.somethingold has the same problem as Konqueror
19:16
<virtuelv>
Yeah, I assume p01 has actually tested against Safari, possibly with a recentish nighly of WebKit
19:17
<Philip`>
Same problem (only draws one frame) in WebKit r32574 (from yesterday) on Windows
19:21
<hasather>
Philip`: looks like Safari has problems with CanvasRenderingContext2D.prototype
19:21
<hasather>
which has been discussed in this channel before
19:22
<Philip`>
hasather: Ah, that would make sense
19:24
<Philip`>
http://philip.html5.org/tests/canvas/suite/tests/index.2d.type.html - hmm, Konqueror appears to do CanvasRenderingContext2D properly (whereas WebKit doesn't) but still doesn't work on that demo
19:34
<hsivonen>
I wonder what the relative frequencies of the tokenizer states preceding 'bogus doctype' are...
19:34
<Philip`>
hsivonen: You might be able to deduce it from http://canvex.lazyilluminati.com/misc/stats/tokeniser.html (for a somewhat old version of the spec)
19:35
<Philip`>
(It shows "current state: conditions that were true and will cause the relevant set of steps to execute")
19:36
<Philip`>
(where "true" is the "anything else" fallback when all other conditionals in that state have not matched)
19:49
<hsivonen>
Philip`: there's only one match for BogusDoctype
19:50
<hsivonen>
Philip`: I think I don't understand what I should look for
20:01
<Philip`>
hsivonen: You need to first find the places where the spec says to move to 'bogus doctype'
20:01
<Philip`>
e.g. the 'anything else' part of 'before doctype public identifier'
20:02
<Philip`>
and that part is named "BeforeDoctypePublicIdentifierState: true" in my table thingy (since "true" is the catch-all condition, which is used for "anything else")
20:03
<Philip`>
and that isn't in the list at all, so that never occurred in the HTML I was parsing, so that's not the best example
20:05
<Philip`>
Um, I can't actually find any in the list that are moving into bogus doctype state...
20:06
<Philip`>
(which is odd since it says there were 104 tokeniser steps inside bogus doctype state)
20:06
<Philip`>
(so I'm not entirely sure what's going on there)
20:07
<Philip`>
(Oh well)
20:13
<Philip`>
Conclusion: pages usually have about half a doctype, and a significant majority of those are non-bogus, so it's hard to get extensive data about bogosity, and I can't say anything more useful without having to do some work
20:25
<hsivonen>
Philip`: that probably also means that it's not a point worth optimizing.
20:25
<hsivonen>
thanks
20:26
<Philip`>
hsivonen: Unless someone has a pathological case of a whole page full of bogus doctypes, it seems like not the most critical area for performance
20:58
<hsivonen>
hmm. I refactored the code some more and now the perf sucks even more
20:59
<hsivonen>
the most reasonable expectation is that HotSpot isn't doing field-to-stack hoisting
21:01
<hsivonen>
s/expectation/explanation/
21:28
<hsivonen>
if HotSpot isn't doing field-to-stack hoisting, so of my earlier conclusions are wrong
22:20
<Philip`>
Whoops, using jQuery's 'wrap' method to nest forms is a bad idea, since it breaks (at least) Opera
22:20
<Philip`>
(by making the outer form end just before the inner form)
22:20
<Philip`>
(whereas it works fine in Firefox)
22:20
Philip`
goes back to using plain ugly DOM methods to nest forms
22:34
Philip`
thus finds that form.setAttribute('enctype') doesn't work in IE
22:40
<hsivonen>
I'm still amazed by the 10-fold difference in parser perf after the refactoring
22:40
<hsivonen>
somehow I suspect that the slow-down is due to something I've failed to consider and switch itself can't be *that* slow
22:41
<hsivonen>
could it be that the HotSpot simply avoids compiling the huge tokenization method?
22:42
<Philip`>
hsivonen: Does execution ever leave that method?
22:42
<Philip`>
Maybe it can't JIT methods while it's executing in the middle of them
22:42
<hsivonen>
Philip`: yes. and the FAQ says that HotSpot does on the stack replacement anyway
22:43
<Philip`>
Oh, okay
22:43
<Philip`>
http://forum.java.sun.com/thread.jspa?threadID=790229 - "There is an overriding size limit on methods that can get compiled. In 5.0, methods larger than 8000 bytes (of bytecode) are not considered for compilation."
22:44
<Philip`>
but then it says "Method size is not a compilation criterion, but it is an inlining criteria." so I'm not sure how that relates to the previous statement
22:46
<jgraham>
Can't you use DTrace to work out what' going on?
22:46
<jgraham>
http://java.sun.com/javase/6/docs/technotes/guides/vm/dtrace.html
22:46
<jgraham>
(that link is for DTrace + hotspot)
22:46
<hsivonen>
jgraham: I'd need Solaris to run that, wouldn't I?
22:47
<hsivonen>
since Linux doesn't have DTrace and OS X doesn't have Java 6
22:47
<jgraham>
hsivonen: I guess, if there's no way to get Java 6 on OS X
22:47
<jgraham>
Would OpenSolaris work?
22:47
<hsivonen>
jgraham: yeah, except for all the work of installing it
22:48
Philip`
has a Solaris box
22:48
<Philip`>
but I think it's pretty old
22:48
<Philip`>
(I'm not sure how old it actually is but its uptime is 1030 days)
22:49
<jgraham>
hsivonen: They have a live CD
22:49
<Philip`>
(It's even got Java, but 1.4.0_03)
22:50
<jgraham>
Philip`: Almost the whole IoA runs on old solaris boxes (except, in practice lots of people just use personal machines instead)
22:51
<jgraham>
(fortunately I'm in a group that has its own computing budget and modern linux-running hardware)
22:52
<hsivonen>
indeed it appears that the tokenizer's main loop never gets compiled
22:52
<hsivonen>
that's dumb!
22:52
<hsivonen>
leaving the most important thing uncompiled
22:52
<hsivonen>
wtf?
22:53
<Philip`>
It's strange that even the server VM doesn't do that
22:54
Philip`
likes languages with predictable performance :-)
22:55
<hsivonen>
I'd love to have some radically traditional compilation right now
22:55
<Philip`>
GCJ!
22:57
<Philip`>
Or use a series of sed scripts to convert the tokeniser into a JNI C++ component
22:57
<hsivonen>
Philip`: not an entirely bad idea
22:58
<Philip`>
Uh oh
22:58
<Philip`>
(Which of the ideas do you mean?)
22:59
<Philip`>
(not that it would affect my reaction much)
22:59
jgraham
predicts it's not the sed option
22:59
<hsivonen>
sed to C++
23:00
jgraham
needs to polish his crystal ball
23:17
<hsivonen>
but seriously, how can it be a good idea to leave the largest methods uncompiled
23:17
<hsivonen>
those are almost sure to be parser code
23:17
<hsivonen>
or generated code
23:17
<hsivonen>
i.e. stuff that should be Fast
23:42
<annevk>
http://www.p01.org/releases/DHTML_contests/files/20lines_twinkle/ is cool
23:43
<annevk>
i should put that on a slide calling it "the new <marquee>
23:43
<annevk>
"
23:45
<Philip`>
annevk: That's an excellent idea - <marquee><canvas/></marquee>
23:45
<Philip`>
Works quite nicely on that 20lines_twinkle page
23:47
<hsivonen>
now I need a tool that shows me the bytecode sizes of my methods
23:47
<annevk>
Philip`, hehe, that makes it toaly crazy :)
23:47
<annevk>
(I quite like the edit source function of Opera)
23:49
<Philip`>
hsivonen: javap -c ClassName
23:49
<Philip`>
shows disassembly, including instruction numbering
23:53
<hsivonen>
Philip`: it doesn't show the method I'm looking for
23:54
<Philip`>
Add -private ?
23:55
<hsivonen>
yeah. thanks
23:57
<hsivonen>
I need to spilt out NCR value handling