Op 11-10-2011 13:15, João Abecasis schreef: > Thiago Macieira wrote: >> In the case of QRegExp, I sat down with Lars and João yesterday to discuss a >> bit and we talked about QRegExp. We don't know what to do with it because we >> want to, at the same time: >> >> * move the current engine out >> * use a high-performance engine in QtCore >> * not increase the footprint of QtCore by too much >> * not restrict the platforms unnecessarily >> * avoid code duplication >> * avoid converting from UTF-16 to UTF-8 or, worse, local 8 bit >> >> We're not going to get them all, that's for sure. On one hand, the V8 engine >> is very performant, works on UTF-16 and avoids code duplication, but it >> increases the footprint and restricts the platforms addressed. On the other, >> PCRE is performant too, works almost everywhere and is small, but requires >> UTF-8←→UTF-16 conversion. >> >> I believe the standard WebKit has a PCRE engine inside, modified to work on >> UTF-16. That's also an option, but it is code duplication and causes us to >> have to maintain it. >> >> So maybe the solution is a hybrid: dlopen V8 where it is available, fall back >> to libpcre otherwise. And crash if none is found. That means using regexps >> will cause a library to be loaded, one that can be as big as V8. >> >> What does everyone think? > I'll explicitly state two points that I think should be kept in mind in this > discussion. > > As long as QtWebKit, QtScript, QtDeclarative are using V8, using that as the > backend for QRegExp's-evolution-or-replacement as well allows us to have a > single engine, syntax and implementation across the Qt stack. I think this is > a very desirable feature. Of course, it has to be weighed with the other > issues at stake. > > Secondly, if we decide to use a different RE engine for > QRegExp's-evolution-or-replacement, picking different engines according to > platform or configuration opens the door to subtle cross-platform > differences. It would be best if we can avoid them. Particularly so in Qt > Core. > Would it be conceptually feasible to separate V8's engine from V8 itself, and make V8 link against the separated out engine? Would such a change in V8 be accepted upstream? If so, then it would open up the perspective of just using V8's regexp engine, and don't load the rest of it if not needed...
/me is just daydreaming here... André _______________________________________________ Qt5-feedback mailing list [email protected] http://lists.qt.nokia.com/mailman/listinfo/qt5-feedback
