Command Prompt vs NetBeans : Threading
hello,
I have implemented a thread which continuously check the files added/ removed to/from a folder , and prints "Message" to console.At command prompt, this works very smoothly without consuming any system resources and with a great speed.
But, when I implement this with my main project in the NetBeans, Performance is worstly slowed down.
What may be the probable cause/causes? If you have any idea about threading, please guide me. Thanx.
Regards
Nikhil
i wouldn't be too concerned; you won't actually run your app from netbeans.
> i wouldn't be too concerned; you won't actually run> your app from netbeans.I would be concerned! The only way this will happen is if there is excessive use of resources. The only way we will be able to help the OP is if he posts his code.
> > i wouldn't be too concerned; you won't actually
> run
> > your app from netbeans.
>
> I would be concerned! The only way this will happen
> is if there is excessive use of resources. The only
> way we will be able to help the OP is if he posts his
> code.
it'd expect it's a bug in netbeans.
> > > i wouldn't be too concerned; you won't actually
> > run
> > > your app from netbeans.
> >
> > I would be concerned! The only way this will
> happen
> > is if there is excessive use of resources. The
> only
> > way we will be able to help the OP is if he posts
> his
> > code.
>
> it'd expect it's a bug in netbeans.
:-) I do so hope you are joking!
> > > > i wouldn't be too concerned; you won't
> actually
> > > run
> > > > your app from netbeans.
> > >
> > > I would be concerned! The only way this will
> > happen
> > > is if there is excessive use of resources. The
> > only
> > > way we will be able to help the OP is if he
> posts
> > his
> > > code.
> >
> > it'd expect it's a bug in netbeans.
>
> :-) I do so hope you are joking!
well it's trapping his input obviously, and maybe it blocks it a little, or something, forcing the thread to slow down during it's writes. or perhaps it buffers the output and he only thinks it's running slowly, or something like that.
but yes, code is a good thing to see :)
Ofcurse there is no bug in netBeans. But there might be a problem in interthread communication in my code. My main thread and another one never communicate each other. 2nd thread just checks the number of files. If it found any change, it just give a call to a method in the main. this method just refreshes the JTable and displays the current files.
My performance problem is solved now. but my JTable not gets refreshed.
IF you have any idea , please tell me.
Regards and Thanx to you both.
Nikhil
> Ofcurse there is no bug in netBeans. But there might
> be a problem in interthread communication in my code.
> My main thread and another one never communicate each
> other. 2nd thread just checks the number of files. If
> it found any change, it just give a call to a method
> in the main. this method just refreshes the JTable
> and displays the current files.
>
> My performance problem is solved now. but my JTable
> not gets refreshed.
> IF you have any idea , please tell me.
>
Of the thousands of possible things that could cause this, how do you expect us to come up with the right 'thing' without any view of your code!