Re: [Django] #31692: compilemessages needlessly runs msgfmt on unchanged .po files

2020-06-23 Thread Django
#31692: compilemessages needlessly runs msgfmt on unchanged .po files
-+-
 Reporter:  Per Cederqvist   |Owner:  Claude
 Type:   |  Paroz
  Cleanup/optimization   |   Status:  closed
Component:  Core (Management |  Version:  master
  commands)  |
 Severity:  Normal   |   Resolution:  fixed
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by GitHub ):

 In [changeset:"02ea98bc2ff972f7705bfffb24843494086d011f" 02ea98bc]:
 {{{
 #!CommitTicketReference repository=""
 revision="02ea98bc2ff972f7705bfffb24843494086d011f"
 Refs #31692 -- Fixed compilemessages crash on Windows with Python < 3.8.

 Regression in ed0a040773f5bad187170ab4e3b094fe3108d702.
 See https://bugs.python.org/issue31961
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.a3b39d0c9e995940d03a7bcc53f89ade%40djangoproject.com.


Re: [Django] #31692: compilemessages needlessly runs msgfmt on unchanged .po files

2020-06-22 Thread Django
#31692: compilemessages needlessly runs msgfmt on unchanged .po files
-+-
 Reporter:  Per Cederqvist   |Owner:  Claude
 Type:   |  Paroz
  Cleanup/optimization   |   Status:  assigned
Component:  Core (Management |  Version:  master
  commands)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Mariusz Felisiak ):

 In [changeset:"ed0a040773f5bad187170ab4e3b094fe3108d702" ed0a040]:
 {{{
 #!CommitTicketReference repository=""
 revision="ed0a040773f5bad187170ab4e3b094fe3108d702"
 Refs #31692 -- Updated compilemessages and tests to use pathlib.
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.79c0c9420d75ee80157608e9413ebf04%40djangoproject.com.


Re: [Django] #31692: compilemessages needlessly runs msgfmt on unchanged .po files

2020-06-22 Thread Django
#31692: compilemessages needlessly runs msgfmt on unchanged .po files
-+-
 Reporter:  Per Cederqvist   |Owner:  Claude
 Type:   |  Paroz
  Cleanup/optimization   |   Status:  closed
Component:  Core (Management |  Version:  master
  commands)  |
 Severity:  Normal   |   Resolution:  fixed
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak ):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"e62d55a4fe6555d18eebda638de402447618b500" e62d55a4]:
 {{{
 #!CommitTicketReference repository=""
 revision="e62d55a4fe6555d18eebda638de402447618b500"
 Fixed #31692 -- Prevented unneeded .po file compilation.

 Thanks Nick Pope and Simon Charette for the reviews.
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.32f98674bcd807cd727c33ac295c121b%40djangoproject.com.


Re: [Django] #31692: compilemessages needlessly runs msgfmt on unchanged .po files

2020-06-19 Thread Django
#31692: compilemessages needlessly runs msgfmt on unchanged .po files
-+-
 Reporter:  Per Cederqvist   |Owner:  Claude
 Type:   |  Paroz
  Cleanup/optimization   |   Status:  assigned
Component:  Core (Management |  Version:  master
  commands)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Claude Paroz):

 * has_patch:  0 => 1


Comment:

 [https://github.com/django/django/pull/13085 PR]

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.ed27e32a659468756a3c689f4d509a01%40djangoproject.com.


Re: [Django] #31692: compilemessages needlessly runs msgfmt on unchanged .po files

2020-06-19 Thread Django
#31692: compilemessages needlessly runs msgfmt on unchanged .po files
-+-
 Reporter:  Per Cederqvist   |Owner:  Claude
 Type:   |  Paroz
  Cleanup/optimization   |   Status:  assigned
Component:  Core (Management |  Version:  master
  commands)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Claude Paroz):

 * owner:  nobody => Claude Paroz
 * status:  new => assigned


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.7a790687e06cfdbde76b1f7641367c1e%40djangoproject.com.


Re: [Django] #31692: compilemessages needlessly runs msgfmt on unchanged .po files

2020-06-12 Thread Django
#31692: compilemessages needlessly runs msgfmt on unchanged .po files
-+-
 Reporter:  Per Cederqvist   |Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  Core (Management |  Version:  master
  commands)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Claude Paroz):

 * stage:  Unreviewed => Accepted


Comment:

 Proposal makes sense.

 About the CLA, I don't remember one time where we refused a contribution
 because of that (should be time to drop it?).

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.75c894332f519687cd1184421d789f7d%40djangoproject.com.


[Django] #31692: compilemessages needlessly runs msgfmt on unchanged .po files

2020-06-11 Thread Django
#31692: compilemessages needlessly runs msgfmt on unchanged .po files
-+-
   Reporter:  cederlys   |  Owner:  nobody
   Type: | Status:  new
  Cleanup/optimization   |
  Component:  Core   |Version:  master
  (Management commands)  |
   Severity:  Normal |   Keywords:
   Triage Stage: |  Has patch:  0
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 I have a project where running `django-admin compilemessages` takes 1.75
 seconds. Running it again, when all the `.mo` files already exists and are
 up-to-date, also takes 1.75 seconds.

 I propose that `compilemessages.py` is changed so that it only invokes
 `msgfmt` when it would do anything useful. This can be implemented by
 checking the mtime of the `.po` file and the corresponding `.mo` file. (If
 statting the `.mo` file fails, treat that as if the mtime was 0.) Only
 submit the command to the `executor` if the mtime of the `.po` file is
 greater than that of the `.mo` file.  In effect: don't do anything if the
 `.mo` file is newer than the `.po` file.

 There is one issue with this: the way the code currently uses the
 `is_writable` function. Since it modifies the mtime of the `.mo` file, you
 would have to perform the stat of the `.mo` file before you check if it is
 writable. (Or, you could just remove the `is_writable` function and its
 use. That feature is, in my opinion, of dubious value, and it doesn't
 appear to be documented.)

 After I made the changes above, the runtime in the common case where
 nothing needs to be done was reduced from 1.75 seconds to 0.2 seconds.

 (Unfortunately, I doubt that I will be able to get a Corporate Contributor
 License Agreement signed, so I can unfortunately not contribute my
 change.)

 1.75 seconds may not be much, but when a CI system does it repeatedly, it
 adds up.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/051.bae426a4462cb04cc2f506c3b6aaeaaa%40djangoproject.com.