Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 31 08:19
    18981119465 starred riot/riot
  • Jan 31 06:54
    brockklein starred riot/riot
  • Jan 31 03:39
    syuichi-tsuji starred riot/riot
  • Jan 30 21:00
    progelio closed #2657
  • Jan 30 20:40
    progelio opened #2657
  • Jan 30 12:21
    murillo94 starred riot/riot
  • Jan 30 07:33
    mhijack starred riot/riot
  • Jan 30 07:28
    QMonkey starred riot/riot
  • Jan 30 07:27
    GianlucaGuarini labeled #2655
  • Jan 30 07:22
    AbbyShaw36 starred riot/riot
  • Jan 30 07:04
    aniketsatarkar starred riot/riot
  • Jan 29 23:14
    asolfre starred riot/riot
  • Jan 29 17:34
    kazetsukaimiko closed #2656
  • Jan 29 17:34
    kazetsukaimiko commented #2656
  • Jan 29 17:32
    kazetsukaimiko opened #2656
  • Jan 29 12:49
    faghani starred riot/riot
  • Jan 29 07:34
    GianlucaGuarini assigned #2655
  • Jan 29 07:34
    GianlucaGuarini labeled #2655
  • Jan 29 06:36
    wang6821906 starred riot/riot
  • Jan 29 00:24
    Vic-Dev opened #2655
bufferUnderrun
@bufferUnderrun
i know v4 is a total rewrite but what sort of great feature it brings to avec a 964kb source file ???
i'm very disappointed but i try to find answer on this slow load
luk
@exside

the home page indicate 6.1KB

the actual riot runtime, minified and gzipped is 6K, check it out, riot+compiler is a) unminified and b) not intened to be used for production, the last app I've built had way over 30 tags but never needed 3 seconds to compile and there was logic etc. in them so I'm not sure what's wrong with yours, maybe you can create a reproducible example?

bufferUnderrun
@bufferUnderrun
yeah, i've read minified + gzip. but at this time the bottleneck is not in network transfert. network today is pretty fast and often the slow come from the browser to run the javascript
and i thinks it here the problem..
when i try to trace compile time or mount it's pretty fast (env 50 or 60ms)
but the rendering is incredebly slow 3sec
i'm trying to make a reproductible example
bufferUnderrun
@bufferUnderrun
hum
i think there is a global rendering problem
i use a <html-header> tag to render my html header of my app
when first html load, it partial render the page because the tag is not compile and mount
once riot compile and mount the browser need to rerender the global page and i thinks the bottlenek is here
repeat multiple time with my other tag html-content and html-footer
Brock Atkinson
@BrockAtkinson
@bufferUnderrun something seems wrong there, I've had a very nice experience with riot v4
(some minor issues notwithstanding)
wanna share your code with the chat?
bufferUnderrun
@bufferUnderrun
yes, i'm trying to make a simple reproductible example with the slowing down load
i'm already move some part and gain previous ms at load. so i think i have rendering issues.
i just saw one thing on whichi comparing perfs from v2 to v4 is not so easy : v2 update&mount&update (update twice) whereas v4 mount&update
i'm trying to patch v2 to have the same behaviour but still buggy at this time. Help appreciate of someone know the v2...
bufferUnderrun
@bufferUnderrun
I have 60 tags in my single page application. I have 2 strategies : for dev all src file are xhr and on prod only one file "bundle.tag" contains all of them (1,47Mo for 25000 lines).
riot.compile('controllers/bundle.tag', function() { riot.mount('appweb'); // a tag that just contains text });
it takes 4 or 5 sec ? so if compile is pretty fast, why mounting just a tag (on simple one) is very slow ?
when i just compile and mount nothing is extremly fast
jumping to v4 and doing the same crash the browser
the main app is here : https://3temps2.ville-troyes.fr (yes i'm french)
bufferUnderrun
@bufferUnderrun
another same app : https://passeport.troyes.fr/ this one is public so you can subscribe to work it
bufferUnderrun
@bufferUnderrun
ARGHHHHH !
BOTTLENEK FOUND in v2
came from the function cleanSource (src)
re.lastIndex = 0 while ((mm = re.exec(src))) { if (mm[0][0] === '<') { src = RegExp.leftContext + RegExp.rightContext re.lastIndex = mm[3] + 1 } }
re = HTML_COMMS
this parsing of all my bundle.tag file (1.47Mo, 25000 line) take more than 5sec
this regexp is for delete html com
it's a performance killer
i think there is the same function in v4 to clean and with the same perfs killer that's why my browser crash in v4
bufferUnderrun
@bufferUnderrun
when comment this code, the app still works without any error.
do you know if i can bring side effect or why this cleaning of comment is important ?
bufferUnderrun
@bufferUnderrun
i open an issue for sharing this
bufferUnderrun
@bufferUnderrun
i've patch the 2.6.9, and have a very good perfs in production.
bye guys, weekend :)
tu3816329
@tu3816329
Hi guys, i m relatively new with Riot 4. Anyone know how to call to an external tag with Riot4. With Riot3, there's this.tags
Example
<my-tag></mytag> <div class="wrapper"> <my-second-tag></my-second-tag> </div>
So how can i call <my-tag> to execute a function in export default { myfunction(){ this.update() } } from <my-second-tag> when i change a value in it
Any help would be appreciate
tu3816329
@tu3816329

What s more, how can i achieve something like this el.on(hello-event, function(greeting) {
self.hi = greeting
})

// trigger start event with one parameter
el.trigger('hello-event', 'Hello!')

tu3816329
@tu3816329
el.on('hello-event',function(){ }) in Riot 4