FileInputStream / FileOutputStream Considered Harmful

37 views
Skip to first unread message

Tim Nelson

unread,
Apr 19, 2017, 12:13:44 PM4/19/17
to Lift
Hi all,


Essentially, it says using ```new FileInputStream``` and ```new FileOutputStream``` can cause long GC pauses. The fix is to use the newer java.nio classes.

Should we update Lift? Are we still supporting Java 6?

Tim


Diego Medina

unread,
Apr 19, 2017, 12:48:55 PM4/19/17
to Lift
we have moved to java 8 on lift 3.x, so +1 to update the code

--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code

---
You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Diego Medina
Lift/Scala Consultant
di...@fmpwizard.com
https://blog.fmpwizard.com/

Matt Farmer

unread,
Apr 19, 2017, 1:05:52 PM4/19/17
to Lift
+1 to fewer GC pauses.

On Wed, Apr 19, 2017 at 12:48 PM Diego Medina <di...@fmpwizard.com> wrote:
we have moved to java 8 on lift 3.x, so +1 to update the code
On Wed, Apr 19, 2017 at 12:13 PM, Tim Nelson <tnel...@gmail.com> wrote:
Hi all,


Essentially, it says using ```new FileInputStream``` and ```new FileOutputStream``` can cause long GC pauses. The fix is to use the newer java.nio classes.

Should we update Lift? Are we still supporting Java 6?

Tim


--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code

---
You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+u...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
Diego Medina
Lift/Scala Consultant
di...@fmpwizard.com
https://blog.fmpwizard.com/

--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code

---
You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+u...@googlegroups.com.

Antonio Salazar Cardozo

unread,
Apr 19, 2017, 7:57:39 PM4/19/17
to Lift
+1 from me!

Though for the record I've never noticed this triggering any GC pauses in
the production Lift apps I've worked with. Then again, none of them are particularly
file-heavy :)
Thanks,
Antonio

On Wednesday, April 19, 2017 at 1:05:52 PM UTC-4, Matt Farmer wrote:
+1 to fewer GC pauses.

On Wed, Apr 19, 2017 at 12:48 PM Diego Medina <di...@fmpwizard.com> wrote:
we have moved to java 8 on lift 3.x, so +1 to update the code
On Wed, Apr 19, 2017 at 12:13 PM, Tim Nelson <tnel...@gmail.com> wrote:
Hi all,


Essentially, it says using ```new FileInputStream``` and ```new FileOutputStream``` can cause long GC pauses. The fix is to use the newer java.nio classes.

Should we update Lift? Are we still supporting Java 6?

Tim


--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code

---
You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
Diego Medina
Lift/Scala Consultant
di...@fmpwizard.com
https://blog.fmpwizard.com/

--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code

---
You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+unsubscribe@googlegroups.com.

Tim Nelson

unread,
Apr 20, 2017, 5:38:03 AM4/20/17
to Lift
Antonio
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+u...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
Diego Medina
Lift/Scala Consultant
di...@fmpwizard.com
https://blog.fmpwizard.com/

--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code

---
You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+u...@googlegroups.com.

Antonio Salazar Cardozo

unread,
Apr 20, 2017, 9:43:00 AM4/20/17
to Lift
As a side note, this would probably be a very easy first PR if someone's
lurking and wanting to contribute :)
Thanks,
Antonio

Tim Nelson

unread,
Apr 20, 2017, 11:54:28 AM4/20/17
to Lift
So easy I decided to just do it right away. Besides, I had just updated our app at work. Sorry if anyone wanted to do it.

I just sent a PR.

Tim

Antonio Salazar Cardozo

unread,
Apr 22, 2017, 8:15:19 AM4/22/17
to Lift
:D 👍
Reply all
Reply to author
Forward
0 new messages