Hello,
first thing i have to say i'm really amazed about this great open source
community and the professional work that have been done till yet. We
evalutate red5 for a streaming solution of plain mp3 audio files via
rtmp to a flash frontend. This functionality seems to be stable (a
little bug exists, discussed little bit earlier on this list with the
topic "problems after NetStream.Play.Stop is issued").
I had take a intensive look at relevant code, here are some peanuts that
catch my eyes ;-)
org.red5.io.mp3.impl.MP3Reader
- every streaming file are mapped completely at memory (that means if i
have 100 simultaneous streams where each file has a size of 4 - 5 MB ->
400 - 500 MB of memory are allocated, even if 50 Streams use the same
file)
- the FileInputStream and MappedByteBuffer lives till the end of the
MP3Reader Instance, in my opinion both can be closed/released after
mapping the stream to the Mina ByteBuffer
- the meta files to store KeyFrame Metadata can be very large, maybe a
own binary serializer can be a hint
org.red5.*
- you should declare as many as possible variables as mutable (final)
- you use very often loops like this (which is in performance
considerations generally better than iterator pattern)
for( int i = 0; i < frameMeta.positions.length; i++)
if the length of the array dosen't change you should generally
use this like this
for( int i = 0, a = frameMeta.positions.length, i < a; i++ )
So that's my contribution for today, maybe we can discuss this points (a
other great topic is a switch from ant to maven which makes development
much easier)
Best regards from Berlin
Stefan Mees
_______________________________________________
Red5 mailing list
[email protected]
http://osflash.org/mailman/listinfo/red5_osflash.org